Yet Another bourne shell query
Paul Chamberlain/32767
tif at doorstop.austin.ibm.com
Fri Aug 31 23:14:55 AEST 1990
In article <437 at minya.UUCP> jc at minya.UUCP (John Chambers) writes:
>I basically want to write something like:
> if [ <file 0 is open> ];then exec</dev/null;fi
This seems to work:
if read x
then : okay
else
exec < /dev/null
fi
I hope you're not going to all this trouble to use /dev/null though.
Paul Chamberlain | I do NOT represent IBM tif at doorstop, sc30661 at ausvm6
512/838-7008 | ...!cs.utexas.edu!ibmaus!auschs!doorstop.austin.ibm.com!tif
More information about the Comp.unix.shell
mailing list