home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!s5!is1.is.morgan.com!is0.is.morgan.com!chetal
- From: chetal@is.morgan.com (Pradeep Chetal)
- Subject: Re: isatty in Korn shell
- In-Reply-To: bryan@netcom.com's message of Tue, 11 Aug 92 23:15:26 GMT
- Message-ID: <CHETAL.92Aug13015744@is1.is.morgan.com>
- Sender: news@is.morgan.com
- Nntp-Posting-Host: is1
- Organization: Morgan Stanley & Company
- References: <683mp4q.bryan@netcom.com>
- Date: Thu, 13 Aug 1992 06:57:44 GMT
- Lines: 17
-
- In article <683mp4q.bryan@netcom.com> bryan@netcom.com (Bryan Higgins) writes:
-
- How can I test in a Korn Shell script if standard input is a tty?
-
- if test -t 0; then
- echo stdin is a tty
- else
- echo foo bar
- fi
-
- /Pradeep
- --
- ----------------------------------------------------------------------------
- Pradeep Chetal Phone: 81-3-3286-9678
- Information Services Deptartment FAX: 81-3-3286-9040
- Morgan Stanley Japan Ltd. Tokyo Branch E-mail: chetal@is.morgan.com
- Ote Center Bldg. 3F, 1-1-3 Otemachi, Chiyoda-ku, Tokyo 100
-