MarketMeets
Friday, February 17, 2006
UNIX - Find a particular line in a file
Problem: Given a line number display that line on the console.
Courtesy: Eliott Limb
Solution: cat file_name|head -line_number|tail -1
courtesy: Murali Ananth
Solution: cat -n file_name|grep "^line_number *"
posted by shanks @
12:39 PM
0 comments
About Me
Name:
shanks
View my complete profile
Links
Google News
Edit-Me
Edit-Me
Previous Posts
UNIX - Find a particular line in a file
Archives
February 2006