Results 1 to 2 of 2
hi
1. I m just new to shell script.. here i have to display the last line of my file
without using "wc -l" command...
2. Also i want to ...
- 02-05-2010 #1Just Joined!
- Join Date
- Dec 2009
- Posts
- 13
display last line
hi
1. I m just new to shell script.. here i have to display the last line of my file
without using "wc -l" command...
2. Also i want to know about any alternate command for "head" and "tail".
thankyou
- 02-05-2010 #2Linux User
- Join Date
- Nov 2009
- Location
- France
- Posts
- 292
wc -l will give you the count of lines and won't print any line.
tail is what almost any one would use for this kind of task.
You can also use sed to do this :
sed one-liners0 + 1 = 1 != 2 <> 3 != 4 ...
Until the camel can pass though the eye of the needle.


Reply With Quote