Hi,

Try:

EXEC "sh -c tty" CAPTURING ANS
IS.A.TERM = (INDEX(ANS,"/dev/pts",1) # 0)

/Andre

Date: Tue, 01 May 2007 12:41:16 -0400
From: "Brutzman, Bill" <[EMAIL PROTECTED]>
Subject: RE: [U2] Who Am I ?   wIntegrate

The following helps a lot...  How can it be cranked into UniBasic?

- --Bill

- -----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Ron Sharcott
Sent: Monday, April 30, 2007 5:56 PM
To: '[email protected]'
Subject: RE: [U2] Who Am I ? wIntegrate


I think this is what you're looking for.

Try capturing the results of the tty command (UNIX). These are different
if
terminal (dev/pty##) or if wIntegrate.

We use this style of testing for Datatel's UI so that wIntegrate gets
the
prompt and terminal gets a menu.

I've trimmed it a touch to make it clearer but if you change the echos
to
write to a file you should capture the correct value.


ISINT=`tty | grep -c /dev/pts`
if [ "${ISINT}j" = "1j" ]
  then
        echo "Terminal session"
  else
        echo "From wIntegrate
fi


Important Notice: This email is subject to important restrictions,
qualifications and disclaimers ("the Disclaimer") that must be accessed
and read at the following address or by copying and pasting the following
address into your Internet browser's address bar: 
http://www.frstia.co.za/Disclaimer.asp

The Disclaimer is deemed to form part of the content
of this email in terms of Section 11 of the Electronic Communications
and Transactions Act, 25 of 2002. If you cannot access the Disclaimer,
please obtain a copy thereof from us by sending an email to mailto:[EMAIL 
PROTECTED]

FirstRand STI Admin (Pty) Ltd is an Authorised Financial Services Provider
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to