Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!lavaca.uh.edu!uhnix1!sugar!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.unix.wizards Subject: Re: csh / bsd job control Message-ID: Date: 23 Mar 90 23:30:25 GMT References: <22821@adm.BRL.MIL> <1990Mar23.152715.5958@eddie.mit.edu> Reply-To: peter@ficc.uu.net (Peter da Silva) Organization: Xenix Support, FICC Lines: 9 > 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. . / \ 'U` \_.--._/ v