home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / shell / 3473 < prev    next >
Encoding:
Text File  |  1992-08-12  |  1.1 KB  |  31 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!s5!is1.is.morgan.com!is0.is.morgan.com!chetal
  3. From: chetal@is.morgan.com (Pradeep Chetal)
  4. Subject: Re: isatty in Korn shell
  5. In-Reply-To: bryan@netcom.com's message of Tue, 11 Aug 92 23:15:26 GMT
  6. Message-ID: <CHETAL.92Aug13015744@is1.is.morgan.com>
  7. Sender: news@is.morgan.com
  8. Nntp-Posting-Host: is1
  9. Organization: Morgan Stanley & Company
  10. References: <683mp4q.bryan@netcom.com>
  11. Date: Thu, 13 Aug 1992 06:57:44 GMT
  12. Lines: 17
  13.  
  14. In article <683mp4q.bryan@netcom.com> bryan@netcom.com (Bryan Higgins) writes:
  15.  
  16.    How can I test in a Korn Shell script if standard input is a tty?
  17.  
  18. if test -t 0; then
  19.     echo stdin is a tty
  20. else
  21.     echo foo bar
  22. fi
  23.  
  24. /Pradeep
  25. --
  26. ----------------------------------------------------------------------------
  27. Pradeep Chetal                                          Phone: 81-3-3286-9678
  28. Information Services Deptartment                          FAX: 81-3-3286-9040
  29. Morgan Stanley Japan Ltd.  Tokyo Branch            E-mail: chetal@is.morgan.com
  30.         Ote Center Bldg. 3F, 1-1-3 Otemachi, Chiyoda-ku, Tokyo 100
  31.