Simple bash problem.




Anyone know why the following simple bash script fails
on RHEL3 (fully patched)? It seems the "trap" command
is being silently ignored.


--------------------------------------------
#!/bin/sh

sigtrap () {
echo "Caught signal!"
exit 0
}

trap sigtrap 1 2 3 15

while read X; do
echo $X
done
--------------------------------------------


Simon Ashford.

-------------------------------------------------------------------
This e-mail and any attachments may contain confidential and/or
privileged material; it is for the intended addressee(s) only.
If you are not a named addressee, you must not use, retain or
disclose such information.

NPL Management Ltd cannot guarantee that the e-mail or any
attachments are free from viruses.

NPL Management Ltd. Registered in England and Wales. No: 2937881
Registered Office: Serco House, 16 Bartley Wood Business Park,
Hook, Hampshire, United Kingdom RG27 9UY
-------------------------------------------------------------------

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • RE: Simple bash problem.
    ... Subject: Simple bash problem. ... The information contained in this message and/or attachments ... NPL Management Ltd. Registered in England and Wales. ... Registered Office: Serco House, 16 Bartley Wood Business Park, ...
    (RedHat)
  • MSF Outage 13 March 2008
    ... NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses. ... Registered Office: Serco House, 16 Bartley Wood Business Park, Hook, Hampshire, United Kingdom RG27 9UY ...
    (comp.protocols.time.ntp)
  • MSF Outage 12 June 2008
    ... NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses. ... Registered Office: Serco House, 16 Bartley Wood Business Park, Hook, Hampshire, United Kingdom RG27 9UY ...
    (comp.protocols.time.ntp)
  • MSF Outage 22-24 July 2008
    ... NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses. ... Registered Office: Serco House, 16 Bartley Wood Business Park, Hook, Hampshire, United Kingdom RG27 9UY ...
    (comp.protocols.time.ntp)
  • Re: MAILX on an AIX server with arguments
    ... On Tue, 26 Sep 2006 13:16:30 GMT, Scott McMillan ... # MAILX.SH - generic shell to perform mailx with attachments. ... # 1 filename to use as e-mail body (needs fully qualified pathname). ... echo "$mfile"> $afile.uu ...
    (comp.unix.shell)