In centos 4 we used tail in the following way:
tail +83 file
That would tail the contents of the file starting at line 83. In centos 5 that same command complains about the file +83 not being found. It appears that the + option in tail doesn't work the same way in centos 5. Is there another easy way to grab the contents of a file starting at a certain line number and beyond.
on 2/4/2008 1:56 PM Scott McClanahan spake the following:
In centos 4 we used tail in the following way:
tail +83 file
That would tail the contents of the file starting at line 83. In centos 5 that same command complains about the file +83 not being found. It appears that the + option in tail doesn't work the same way in centos 5. Is there another easy way to grab the contents of a file starting at a certain line number and beyond.
I think it would be tail -n +83 file
On Mon, 2008-02-04 at 14:09 -0800, Scott Silva wrote:
on 2/4/2008 1:56 PM Scott McClanahan spake the following:
In centos 4 we used tail in the following way:
tail +83 file
That would tail the contents of the file starting at line 83. In centos 5 that same command complains about the file +83 not being found. It appears that the + option in tail doesn't work the same way in centos 5. Is there another easy way to grab the contents of a file starting at a certain line number and beyond.
I think it would be tail -n +83 file
Ahh, yes. Because it can be a line count or byte count. The -n wasn't necessary in the old coreutils. Thanks alot.
On Mon, Feb 04, 2008, Scott McClanahan wrote:
On Mon, 2008-02-04 at 14:09 -0800, Scott Silva wrote:
on 2/4/2008 1:56 PM Scott McClanahan spake the following:
In centos 4 we used tail in the following way:
tail +83 file
That would tail the contents of the file starting at line 83. In centos 5 that same command complains about the file +83 not being found. It appears that the + option in tail doesn't work the same way in centos 5. Is there another easy way to grab the contents of a file starting at a certain line number and beyond.
I think it would be tail -n +83 file
Ahh, yes. Because it can be a line count or byte count. The -n wasn't necessary in the old coreutils. Thanks alot.
The default syntax for tail for the last 20 years or so would be ``tail -83 filename''.
Bill -- INTERNET: bill@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
Imagine if every Thursday your shoes exploded if you tied them the usual way. This happens to us all the time with computers, and nobody thinks of complaining. -- Jef Raskin http://jefraskin.com/
on 2/4/2008 2:23 PM Bill Campbell spake the following:
On Mon, Feb 04, 2008, Scott McClanahan wrote:
On Mon, 2008-02-04 at 14:09 -0800, Scott Silva wrote:
on 2/4/2008 1:56 PM Scott McClanahan spake the following:
In centos 4 we used tail in the following way:
tail +83 file
That would tail the contents of the file starting at line 83. In centos 5 that same command complains about the file +83 not being found. It appears that the + option in tail doesn't work the same way in centos 5. Is there another easy way to grab the contents of a file starting at a certain line number and beyond.
I think it would be tail -n +83 file
Ahh, yes. Because it can be a line count or byte count. The -n wasn't necessary in the old coreutils. Thanks alot.
The default syntax for tail for the last 20 years or so would be ``tail -83 filename''.
That would be for the LAST 83 lines. The poster wanted to start the tail FROM line 83 to the end.
On Feb 4, 2008 2:31 PM, Scott Silva ssilva@sgvwater.com wrote:
on 2/4/2008 2:23 PM Bill Campbell spake the following:
On Mon, Feb 04, 2008, Scott McClanahan wrote:
The default syntax for tail for the last 20 years or so would be ``tail -83 filename''.
That would be for the LAST 83 lines. The poster wanted to start the tail FROM line 83 to the end.
The 'tail -#' syntax has been deprecated for years. The correct syntax, per the man page, is 'tail -n #' for the last # lines of the file, default 10, and if the # begins with a '+' it means from the #'th line from the front of the file.
There is no mention of the 'tail -#' syntax in the man page.
mhr
On Mon, 4 Feb 2008 14:58:27 -0800 MHR mhullrich@gmail.com took out a #2 pencil and scribbled:
On Feb 4, 2008 2:31 PM, Scott Silva ssilva@sgvwater.com wrote:
on 2/4/2008 2:23 PM Bill Campbell spake the following:
On Mon, Feb 04, 2008, Scott McClanahan wrote:
The default syntax for tail for the last 20 years or so would be ``tail -83 filename''.
That would be for the LAST 83 lines. The poster wanted to start the tail FROM line 83 to the end.
The 'tail -#' syntax has been deprecated for years. The correct syntax, per the man page, is 'tail -n #' for the last # lines of the file, default 10, and if the # begins with a '+' it means from the #'th line from the front of the file.
There is no mention of the 'tail -#' syntax in the man page.
mhr
It's in the info page.
info tail
HTH