Getting line numbers and jump in to
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
FNR is basically the line number. The trick to printing all fields after $1 is to set $1 to "" and print $0 (or you can loop from 2 to NF). This technique is similar in bash/sh to using while read LINE; do set $LINE; shift; echo $@....
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].