Pending OpenSSH release, call for testing.

Albert Cahalan albert at users.sf.net
Wed Aug 18 02:12:25 EST 2004


Ben Lindstrom writes:

[complaining about "head -2000" not working]

> Kinda sucks that FSF had to break rank.  I'm sure a
> lot of people are going to run into this problem in
> the near future.

Simply put, the FSF is wrong. I just looked at the
latest revision of the standard.

The standard requires that _users_ of head not
rely on "head -2000" usage. The standard does not
in any way prohibit the head implementation from
supporting non-conformant users.

That is, an implementation is allowed to add
vendor-specific options that are not in the standard.
So we want: -1, -2, -3, -4, ... and so on.

To open a file named "-4", you need the "--" option.
If the "head -2000" syntax isn't supported, it would
be an error. You'd do "head -- -2000" to open a file
with the name "-2000".

So, let bug-coreutils at gnu.org know. Here's the standard:
http://www.opengroup.org/onlinepubs/009695399/utilities/head.html

> Kinda like the whole crap around 'nslookup' and the
> removal of '-' in Linux's 'ps' program.  Stupid
> things done for stupid reasons.

The '-' was not removed from Linux ps. Linux ps fully
conforms to the standards, as well as supporting
old BSD syntax as much as possible. Try it:

ps -ef
ps -el
ps -elf
ps -u root
ps -uroot    # now guess what "ps -uax" means

It's just like Solaris, HP-UX, UnixWare, IRIX,
and every other POSIX or real UNIX system.

Just like with AIX and Tru64, you can leave off the
'-' if you want the non-standard BSD options. Most
BSD users would leave off the '-' anyway; why type
the extra character?

I wrote the new ps, and I use "ps aux" all the time.
It's not getting killed. I might kill the ability to
fall back to BSD parsing when you do "ps -aux" and
a user named "x" doesn't exist, allowing you to get
a proper error message -- maybe you wanted user "X",
or you forgot to create a user named "x".

Heck, I even allow mixing the options:

ps -uroot u
ps u -u root
ps -e e f -f
ps -ef ef





More information about the openssh-unix-dev mailing list