[comp.unix.xenix] /etc/wall

daveh@marob.MASA.COM (Dave Hammond) (02/15/89)

I rarely (once every few years :-) use /etc/wall, but a recent system
problem required quickly informing folks.  Attempting to run "wall"
from a root login, running ksh, resulted in:

ksh: who^sed: not found

What? A glance into /etc/wall showed the line:

who^sed -e 's/^[^ ]* *\([^ ]*\).*/cat \/tmp\/'$$' >\/dev\/\1 \&sleep 2/' | sh

[ To those under age 40 -- ^ was a synonym for | on machines which
  didn't include a | keystroke [about 100 years ago :-)].  Therefore, the
  construct "who^sed" was indented to run "who" and pipe it to "sed". ]

My first gripe is that the programmer who coded the above line used ^
to pipe "who" to "sed" , and | to pipe "sed" to "sh" ... Two different
pipe metachars in one line.

My second gripe is that no modern Unix programmer uses ^ as a pipeline
metacharacter. Ksh dropped the ^ synonym *years* ago, labeling it
an antiquated metacharacter;  The initial reference to ^ in the SCO sh(C)
manual page is a brief, parenthetical note: "(The caret (^) is an obsolete
synonym for the vertical bar and should not be used in a pipeline.)".

Perhaps SCO would consider modernizing /etc/wall.

BTW -- followups about not using ksh as a root shell, not using /etc/wall,
or making the (obviously easy) fix to wall, are beside the point.

--
Dave Hammond
daveh@marob.masa.com