tail + option in solaris and linux
Hi All
I have a file with contents as Line 1 Line 2 Line 3 Line 4 Line 5 In Solaris, tail command is working as tail +1 test ---> tailing whole file Line 1 Line 2 Line 3 Line 4 Line 5 tail +2 test --->skipping first line and tailing restLine 2 Line 3 Line 4 Line 5 But when I try the same in Linux RHEL 3.4, I am getting below tail +1 test tail: cannot open `+1' for reading: No such file or directory ==> test <== Line 1 Line 2 Line 3 Line 4 Line 5 tail +2 test tail: cannot open `+2' for reading: No such file or directory ==> test <== Line 1 Line 2 Line 3 Line 4 Line 5 Any idea? Any alternative in LInux?? Regards AMV |
its tail -n +2
|
use tail -n +NUM file name
This behavior is documented in /usr/share/doc/coreutils-*/NEWS Code:
A few usages still have behavior that depends on which POSIX standard is |
Many Thanks.. Now it is clear..
Regards AMV |
If you have similar questions at the next time, you should read the manpage to find out the answer for yourself:
Code:
-n, --lines=K |
All times are GMT -5. The time now is 09:16 PM. |