read bug in 4.4 /bin/sh?

era at NIWOT.UCAR.EDU era at NIWOT.UCAR.EDU
Tue Mar 21 03:00:17 AEST 1989


Does anybody out there know what i/o redirection with the
Bourne shell's read command is *supposed* to do?

The following shell script reads the first word from itself
into the variable x and echoes it under SunOS 4.0.  However,
it hangs under OSx4.4 and Ultrix 2.2; if you type a line at
it while it's hung, it belches out "$0: illegal io".  Anybody
know who's "right"?
--------
#!/bin/sh
read x < $0
echo x = $x
--------

Ed Arnold, NCAR
era at ncar.ucar.edu



More information about the Comp.sys.pyramid mailing list