Electronics Programming
Linux Posts, Programming Posts, Atmega Posts and others.
Search This Blog
Friday, February 6, 2009
How to display a particular line from file
Say we have to display only line number 9 in file a.sh
tail -n +9 a.sh | head -1
head -9 a.sh|tail -1
sed -n '9p' a.sh
[this is display line 9, 19, 29 so on]
cat -n a.sh | grep 9
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment