Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ncar!gatech!ukma!usenet.ins.cwru.edu!news From: news@usenet.ins.cwru.edu Newsgroups: comp.unix.questions Subject: Re: Interrupting only one command from a sequence Message-ID: <1990Nov16.205148.2237@usenet.ins.cwru.edu> Date: 16 Nov 90 20:51:48 GMT References: <1990Nov16.180822.1843@elroy.jpl.nasa.gov> Reply-To: chet@po.CWRU.Edu Organization: Case Western Reserve Univ. Cleveland, Ohio, (USA) Lines: 33 Nntp-Posting-Host: thor.ins.cwru.edu In article <1990Nov16.180822.1843@elroy.jpl.nasa.gov> pjs@euclid.jpl.nasa.gov writes: >I would like to be able to execute an alias that equates >to a sequence of commands, e.g. "a; b; c; d" so that >typing ^C while a is executing causes execution to proceed >to b, instead of terminating the whole sequence. I'd also >like to revert to the normal behavior upon completing the >command sequence. Any ideas? Well, in bash or ksh you could do alias abcd="a ; b ; c ; d" Here's what I get with bash. thor$ abcd this is a ^Cthis is b ^Cthis is c ^Cthis is d ^Cthor$ Where a, b, c, and d are all links to the same shell script: echo this is ${0##*/} sleep 5 Chet -- Chet Ramey ``I die, Horatio'' Network Services Group, Case Western Reserve University chet@ins.CWRU.Edu My opinions are just those, and mine alone.