Link to home
Start Free TrialLog in
Avatar of dda
ddaFlag for Russian Federation

asked on

Getting tty name from script

How can I determine what is the current tty name? The only way I know is to issue "system("tty") > somefile" and read the file afterwards.
ASKER CERTIFIED SOLUTION
Avatar of alexbik
alexbik

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dda

ASKER

This is much easier than I thought!
Avatar of ozo
#also:
use POSIX;
$tty=POSIX::ttyname(2);