Yet Another bourne shell query

Don Bolton lugnut at sequent.UUCP
Wed Sep 5 11:31:51 AEST 1990


In article <3330 at awdprime.UUCP> tif at reed.UUCP (Paul Chamberlain/32767) writes:
>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
>
HUH?  seems like echo "" or exit would go there, or just forget the
else entirely tis an optional item.

>I hope you're not going to all this trouble to use /dev/null though.
>
Best use for /dev/null is a mail forward while you are on vacation :-)

>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