shosei

awk - print one+ columns

Feb 23rd, 2012
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. #!/bin/bash
  2. # awk - print out one or more columns
  3.  
  4. p=\$$( echo $1 | sed 's/,/,\$/g' )
  5. shift
  6. eval "awk '{ print $p }'" $*
  7.  
  8. # eof
Advertisement
Add Comment
Please, Sign In to add comment