to yield the pts/# out of tty's output(/dev/pts/#). I was just wondering if anyone would come up with something different or even faster. I have question though, why is $1 better than \1? \1 works, but Perl suggest using $1.perl -we '$tty=qx(tty); $tty=~s/.*d...(.*)/$1/; print $tty'
In reply to More than one way to do it??? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |