csh / bsd job control

Peter da Silva peter at ficc.uu.net
Sat Mar 24 09:30:25 AEST 1990


> Csh already has "prefixes" like "nohup `command'" or "time `command'".
> How about a prefix like "condom `command'", which would save the tty state 
> before the command is run and restore it after to a "safe" state (:-).

alias condom 'stty -g >! /tmp/stty'$$' ; \!* ; sh -c '"'"'stty `cat /tmp/stty'$$'`'"'"

All the weird quotes are thanks to an unforgiving shell. It'd be easier as
as shell script, but then you couldn't condom aliases. If there was a *real*
inverse to stty -g (i.e., reading from stdin) it'd help a lot.
-- 
 _--_|\  `-_-' Peter da Silva. +1 713 274 5180. <peter at ficc.uu.net>.
/      \  'U`
\_.--._/
      v



More information about the Comp.unix.wizards mailing list