If you are absolutely alone on that system - here's a very very bad, ugly, naughty hack someone (I won't reveal who) uses in administration shell scripts(!) to set passwords for databases etc.: he just moves away /dev/tty, writes the password into /dev/tty (textfile!) twice and invokes 'passwd someuser'. Hell breaks loose if somebody in the meantime opens a pager. This is really a bad daily wtf. I never did such a thing, honest!
So if you just want the output - save your /dev/tty ... well, I trust you're reasonable! ... don't forget to restore /dev/tty
Shame on me for writing this *blush*
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In reply to Re: trapping output from /dev/tty
by shmem
in thread trapping output from /dev/tty
by former33t
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |