Hello,

Seems in going to sh-utils 2.0 the default behavior of "who" when invoked
as "who am i" has changed and this breaks many people's scripts.

In particular, a common way in ~/.profile & ~/.cshrc to set the DISPLAY
for remote logins is to run "who am i" and extract the (hostname)
or (:0.0) that comes from the last field. who in sh-utils 2.0 no
longer does this (see below). It appears the "-l" or "--lookup" option
does provide this info, so that could be used as a workaround, however
for an inhomogenous environment where a user's ~/.profile is shared
for many flavors of Unix this doesn't work either.

Is it that important to have "-l" be completely orthogonal from 
everything else so as to break many people's scripts using "who am i"?
Were it up to me, "who am i" for GNU who would imply -l. Even
a WHO_OPTS environment variable would be nice...

Thanks,

Karl Runge

---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
Example of bug:

canal[104] who --version
who (GNU sh-utils) 2.0
Written by Joseph Arceneaux and David MacKenzie.

Copyright (C) 1999 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

canal[105] who am i
canal!runge    pts/2    Jan  6 09:57
                                     ^^^^^^^^^^^^^ (missing field)



canal[106] ./who.old --version
who (GNU sh-utils) 1.16

canal[107] ./who.old am i
canal!runge    pts/2    Jan  6 09:57 (silverstone)
                                     ^^^^^^^^^^^^^ (desired field)


canal[109]  uname -a
Linux canal 2.3.35 #28 Mon Jan 3 13:37:44 PST 2000 i686 unknown

canal[110] cat /etc/redhat-release 
Red Hat Linux release 6.1 (Cartman)

---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----

Reply via email to