On Sat, Aug 25, 2001 at 07:49:34AM +0530, [EMAIL PROTECTED] wrote: > BTW what is /dev/null all about ?
> if tty > /dev/null 2>&1 ; then > case $(basename `tty`) in I added that in because, under certain circumstances (although I don't recall _which_ circumstances), evaluating $(basename `tty`) would spew an error because there wasn't a valid tty to work with. So I call tty first and redirect everything to /dev/null just to get the exit status, so that I can verify that there is a tty before trying to examine it. Of course, checking the man page now to see if it would remind me of when the case statement would fail, I see that `tty -s` would do the same thing as my stdout/stderr redirection... -- With the arrest of Dimitry Sklyarov it has become apparent that it is not safe for non US software engineers to visit the United States. - Alan Cox "To prevent unauthorized reading..." - Adobe eBook reader license