From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <102653646721805.tru64-unix-managers.marc@archive.invalid> From: "Urey, Dawn" Date: Mon, 30 Apr 2001 14:26:00 +0000 To: tru64-unix-managers Subject: SUMMARY: detecting user mode X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=102653646721805 MIME-Version: 1 Content-Type: multipart/mixed; boundary="------_=_NextPart_001_01C0D181.7AB766C0" This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C0D181.7AB766C0 Content-Type: text/plain; charset="ISO-8859-1" Thanks to all who responded. The consensus was to use tty -s which returns 0 if it detects a terminal or 1 if no terminal is detected. I also received a link to an faq which was extremely helpful. http://www.faqs.org/faqs/unix-faq/faq/part5/section-5.html Again thanks, Dawn Urey System Admin PGI -----Original Message----- From: Urey, Dawn Sent: Monday, April 30, 2001 8:52 AM To: Tru64 Managers (E-mail) Subject: detecting user mode Is there a command within Unix that will allow you to determine if the process executing a script is interactive or not? The equivalent would be f$mode() in VMS. Thanks, Dawn Urey System Admin PGI This email and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. Personal views and opinions expressed in this communication are those of the originator and may not necessarily reflect those of PGI. If you are NOT the original recipient or the person responsible for delivering the email to the intended recipient, be advised that you have received this email in error, and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you received this email in error, please delete it and immediately notify postmaster@pginw.com. ------_=_NextPart_001_01C0D181.7AB766C0 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable SUMMARY: detecting user mode

Thanks = to all who responded.   The consensus was to use tty = -s which returns 0 if it detects = a terminal or 1 if no terminal is detected.  I also received a = link to an faq which was extremely helpful.

Again = thanks,

Dawn = Urey

System = Admin

PGI


 -----Original Message-----

From:   Urey, Dawn 

Sent:   Monday, April 30, 2001 8:52 AM

To:     Tru64 Managers = (E-mail)

Subject:       = detecting user = mode

Is = there a command within Unix that will allow you to determine if the = process executing a script is interactive or not?  The equivalent = would be f$mode() in VMS.

Thanks,

Dawn = Urey

System = Admin

PGI


This email and any files transmitted = with it are confidential and are intended solely for the use of the = individual or entity to whom they are addressed.  Personal views = and opinions expressed in this communication are those of the = originator and may not necessarily reflect those of PGI.  If you = are NOT the original recipient or the person responsible for delivering = the email to the intended recipient, be advised that you have received = this email in error, and that any use, dissemination, forwarding, = printing, or copying of this email is strictly prohibited.  If you = received this email in error, please delete it and immediately notify = postmaster@pginw.com.

------_=_NextPart_001_01C0D181.7AB766C0--