Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!brolga!eric From: eric@brolga.cc.uq.oz.au (Eric Halil) Newsgroups: comp.unix.shell Subject: How to interrupt shell functions? Message-ID: <1991Jun21.002944.11023@brolga.cc.uq.oz.au> Date: 21 Jun 91 00:29:44 GMT Organization: Prentice Computer Centre, The University of Queensland, Australia. Lines: 20 I have the following function (for bash1.08.1) zless() { for i in $* ; do zcat $i | less done } What I'd like to be able to do is interrupt the function. When I interrupt I can only get (not surprisingly) the "zcat | less". And the for loop continues on it's merry way. I thought putting a "trap 'return' 2" as the first line might work, but it didn't. Any suggestions? Thanks, Eric. -- Eric Halil |Internet/CSnet: eric@cc.uq.oz.au Prentice Computer Centre |Bitnet: eric%cc.uq.oz.au@uunet.uu.net University of Queensland 4072 |UUCP: uunet!munnari!cc.uq.oz!eric AUSTRALIA -- Phone: +61 7 365 3610 |JANET: eric%cc.uq.oz.au@uk.ac.ukc