robertharvey@my-deja.com wrote:
> George Fletcher wrote:
>> Gold ol' Linux, bad ol' Posix. This time FC5 has broken my shell
>> scripts by redefining the flags for the 'tail' command. Most notably,
>> by deleting the second most used flag '+#', used to concatenate a file
>> beginning at line #.
>
>
> I have just checked on both suse and mandriva and the +nnnn switch is
> still supported as I would expect. I agree with you, if RedHat have
> done this, then it is extremely silly indeed, and seems vaguely
> pointless. It would appear, however, that combining -n and +777 will
> work. That is what the strict interpretation of the latest posix
> standard requires. Naked numbers cannot be passed as parameters.
>
> Try setting _POSIX2_VERSION=199209 at the top of your scripts, and see
> if that makes a difference.
>
> The good news is, of course, open source. It should be possible to get
> hold of the source and compile it yourself. Or write something in perl
> to do the same thing.
>
With Red Hat Enterprise Linux 3, the man page says, in part,
"If the first character of N (the number of bytes or lines) is a `+',
print beginning with the Nth item from the start of each file,
otherwise, print the last N items in the file. N may have a multiplier
suffix: b for 512, k for 1024, m for 1048576 (1 Meg)."
With Red Hat Enterprise Linux 4 (actually, CentOS 4), tha manual page says,
in part,
"If the first character of N (the number of bytes or lines) is a '+',
print beginning with the Nth item from the start of each file,
otherwise, print the last N items in the file. N may have a multi-
plier suffix: b 512, k 1024, m 1024*1024."
--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ PGP-Key: 9A2FC99A Registered Machine 241939.
/( )\ Shrewsbury, New Jersey
http://counter.li.org
^^-^^ 06:40:01 up 10 days, 15:48, 5 users, load average: 4.25, 4.24, 4.14