in reply to Re: How do I Determine if my script is being piped to?
in thread How do I Determine if my script is being piped to?
thanksperl -e " print -t STDIN ? qq(STDIN has tty) : qq(NO tty associated);p +rint ' - '; print -p STDIN ? qq(STDIN is a pipe or a named pipe) : qq +(NOT a pipe)" #out #STDIN has tty - NOT a pipe hostname | perl -e " print -t STDIN ? qq(STDIN has tty) : qq(NO tty as +sociated);print ' - '; print -p STDIN ? qq(STDIN is a pipe or a named + pipe) : qq(NOT a pipe)" #out #NO tty associated - STDIN is a pipe or anamed pipe
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How do I Determine if my script is being piped to?
by BrowserUk (Patriarch) on Nov 21, 2013 at 09:58 UTC |