[clug] Pseudoterminal
Bryan Kilgallin (iiNet)
kilgallin at iinet.net.au
Tue Sep 5 01:15:36 UTC 2017
> A problem arose when I tried to distinguish between pseudoterminal
> interfaces tty and pts. If the former were in use, then I wanted the
> terminal title line to begin "Terminal "... instead.
I solved it thus.
{
set pseudoterminal (tty | cut -c 6-8)
if test $pseudoterminal = 'tty'
echo Terminal
else
echo Pseudoterminal
end
}
When will tty show a "tty", and when a "pts"?
--
www.netspeed.com.au/bryan/
More information about the linux
mailing list