David O'Brien writes:
| On Tue, Aug 14, 2001 at 01:23:40PM +0200, Johann Visagie wrote:
| >   if ( "$tty" != "" ) then
| > 
| > (There may be a more elegant way to check for shell interactivity in csh, and
| > if there is I'd like to know about it, please.  :-)
| 
| I've used "if ($?USER == 0 || $?prompt == 0)" in the past.

I've used 'tty' to tell me for more info 'man tty'.
        a21p% echo hello | tty && echo hi
        not a tty
        a21p% tty && echo hi
        /dev/ttypg
        hi
        a21p% 

Don't know if this has been mentioned since I generally ignore things
about bash.

Doug A.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to