[ale] Re: Installing j2se on RHEL 3?
Jim Popovitch
jimpop at yahoo.com
Tue May 24 22:31:09 EDT 2005
On Tue, 2005-05-24 at 21:03 -0400, Joe Steele wrote:
> I think this behavior is controllable. A vanilla version of tail (from GNU
> coreutils-5.2.1) can be forced to exhibit the 'obsolete' behavior if the
> environment contains the variable '_POSIX2_VERSION' set to some value less
> than 200112.
>
> I don't know about RHEL, but FC3 uses a modified tail command so that the
> only way to get the 'new' behavior is to define '_POSIX2_VERSION' >= 200112
> and also define POSIXLY_CORRECT in the environment.
>
> To get the 'obsolete' behavior, I'd suggest trying:
> export _POSIX2_VERSION=199209
Looking at source code for tail.c from RHEL ES3 coreutils-4.5.3 there is
this comment: (where P is the command line parameters being evaluated,
and POSIX textual version 1003.1-2001 is represented as the integer
200112):
/* If P starts with `+' and the POSIX version predates 1003.1-2001,
or if P starts with `-N' (where N is a digit), or `-l', then it
is obsolescent. Return zero otherwise. */
So, by setting _POSIX2_VERSION=200112 one should expect 'tail -1
somefile' to barf. It doesn't. However, looking further at tail.c
shows that parse_obsolescent_option() continues after determining
obsolescence and correctly parses +N, -N despite knowing they are
obsolete. (backwards compatibility == good)
However, if POSIXLY_CORRECT is set in the environment, then tail will
NOT force the backwards compatibility and the user will get an error
like this:
tail: `-1' option is obsolete; use `-n 1'
-Jim P.
More information about the Ale
mailing list