Advertisement
codegazer

how to drop column 1 in awk

Feb 6th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. $ cat words
  2. ls
  3. fish
  4. three four five
  5.  
  6. $ nl -ba words
  7. 1 ls
  8. 2 fish
  9. 3 three four five
  10.  
  11.  
  12. $ nl -ba words | awk '{i=2; while ( i<= NF) { printf("%s ",$i); i++} printf("\n") }'
  13. ls
  14. fish
  15. three four five
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement