Freedom to Write
Monday 29 December 2008
print even or odd numbered lines
Print the even-numbered lines in the data file:
awk 'NR % 2 == 0' data
If you use the expression `NR % 2 == 1' instead, the program would print the odd-numbered lines.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Tweets by @sriramperumalla
No comments:
Post a Comment