Thursday, 29 January 2009

Snippets of code

Ever wanted to get a line by specifying the line number?

This code does just that.



# awk 'NR==$line{print;exit}' $filename

No comments:

Post a Comment