Xref: utzoo comp.unix.shell:1760 comp.unix.sysv386:6407 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!mcsun!ukc!stl!robobar!ronald From: ronald@robobar.co.uk (Ronald S H Khoo) Newsgroups: comp.unix.shell,comp.unix.sysv386 Subject: trap 0 in /bin/sh Message-ID: <1991Mar27.153352.4421@robobar.co.uk> Date: 27 Mar 91 15:33:52 GMT Sender: ronald@robobar.co.uk (Ronald S H Khoo) Organization: Robobar Ltd., Perivale, Middx., ENGLAND. Lines: 13 Can someone explain why these two commands give different output ? Is there some subtlety about the "trap" command that I don't understand ? $ ( trap 'echo foo' 0 ; true ) $ ( trap 'echo foo' 0 ; : ) foo I tried this using /bin/sh on SCO Xenix, SCO Unix (orig release) and GEC UX/63 (SVR2, I think) and SunOS 4.1. Yes, I know they're all System V /bin/sh, but I don't have a BSD handy to try. -- Ronald Khoo +44 81 991 1142 (O) +44 71 229 7741 (H)