Skip to content
This repository
Browse code

Continue awk annihilating rampage

  • Loading branch information...
commit 25620194c64432f060ad308dd6bb979ca4219055 1 parent 6ecc007
Richo Healey authored August 27, 2012

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. 5  contrib/gemset_snapshot
5  contrib/gemset_snapshot
@@ -8,9 +8,10 @@ gems=($(gem list | sed 's#[\(|\)]##g' | sed 's#, #,#g' | \tr ' ' ';'))
8 8
 
9 9
 for gem in "${gems[@]}" ; do
10 10
 
11  
-  name="$(echo $gem | awk -F';' '{print $1}')"
  11
+  name="${gem%%;*}"
12 12
 
13  
-  versions=($(echo $gem | awk -F';' '{print $2}' | sed 's#,# #g'))
  13
+  versions=${gem#*;}
  14
+  versions=(${versions/,/ })
14 15
 
15 16
   for version in "${versions[@]}" ; do
16 17
 

0 notes on commit 2562019

Please sign in to comment.
Something went wrong with that request. Please try again.