bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BUG: tail 5.93 -c argument is optional?


From: Eric Blake
Subject: Re: BUG: tail 5.93 -c argument is optional?
Date: Mon, 09 Jan 2006 06:01:48 -0700
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to sqweek on 1/6/2006 6:25 AM:
> $ cat bar |tail -c3
> oo
>     # Working fine so far...
> $ cat bar |tail -c 3
> tail: cannot open `3' for reading: No such file or directory

See the NEWS file; this is not a bug.  "tail -c 3" is inherently
non-portable, as POSIX 1003.2-1992 requires it to be interpreted like
"tail -c 10 ./3", and POSIX 1003.1-2001 requires it to be interpreted like
"tail -c3".  Your choice of _POSIX2_VERSION environment variable can
choose which interpretation you desire.  The problem stems from the fact
that in the older POSIX, -c took an optional argument, and optional
arguments cannot be detected unless they are part of the same command-line
argument as the -c.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDwl6784KuGfSFAYARAqk7AJ9FRbYP8x2EU2Veq+cJsyRyn76dPQCgtiTf
r30r2hABXKO6whlBwRQnbUU=
=w2WD
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]