<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: unix command trap in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/unix-command-trap/m-p/4991797#M100463</link>
    <description>&lt;BR /&gt;Thx for your useful answers !&lt;BR /&gt;&lt;BR /&gt;Tom</description>
    <pubDate>Wed, 19 Jul 2006 11:24:16 GMT</pubDate>
    <dc:creator>Billa-User</dc:creator>
    <dc:date>2006-07-19T11:24:16Z</dc:date>
    <item>
      <title>unix command trap</title>
      <link>https://community.hpe.com/t5/operating-system-linux/unix-command-trap/m-p/4991794#M100460</link>
      <description>can somebody help me about the following usage of "trap". i know what "trap" do, but i don't known the usage in the Script below :&lt;BR /&gt;&lt;BR /&gt;"trap ... ;  ; trap - 0 1 2 3 15 ; exit 2" 0 1 2 3 15"&lt;BR /&gt;&lt;BR /&gt;what does "trap -" do ?&lt;BR /&gt;&lt;BR /&gt;example of a SHELL Script&lt;BR /&gt;&lt;BR /&gt;test_prozedure()&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;PRID=$$&lt;BR /&gt;&lt;BR /&gt;trap "rm -f /tmp/sh${PRID}.? ; trap - 0 1 2 3 15 ; exit 2" 0 1 2 3 15&lt;BR /&gt;&lt;BR /&gt;sqlplus -s &amp;lt;&amp;lt;-EOF&lt;BR /&gt;.&lt;BR /&gt;whenever sqlerror exit 9;&lt;BR /&gt;whenever oserror  exit 9;&lt;BR /&gt;.&lt;BR /&gt;Commands ....&lt;BR /&gt;.&lt;BR /&gt;exit 0&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;return ${return_cd:-0}&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;test_prozedure&lt;BR /&gt;echo $?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;best regards Tom&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Jul 2006 02:57:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/unix-command-trap/m-p/4991794#M100460</guid>
      <dc:creator>Billa-User</dc:creator>
      <dc:date>2006-07-19T02:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: unix command trap</title>
      <link>https://community.hpe.com/t5/operating-system-linux/unix-command-trap/m-p/4991795#M100461</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;Trap syntax is&lt;BR /&gt;&lt;BR /&gt;trap [arg] [sig]&lt;BR /&gt;&lt;BR /&gt;Where [arg] - command to execute when shell receives listed signals [sig].&lt;BR /&gt;YOu can interprest this for your cases.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Rajesh SB</description>
      <pubDate>Wed, 19 Jul 2006 03:16:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/unix-command-trap/m-p/4991795#M100461</guid>
      <dc:creator>Rajesh SB</dc:creator>
      <dc:date>2006-07-19T03:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: unix command trap</title>
      <link>https://community.hpe.com/t5/operating-system-linux/unix-command-trap/m-p/4991796#M100462</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;From the 'sh-posix(1)' manpages:&lt;BR /&gt;&lt;BR /&gt;trap [arg] [sig]... &lt;BR /&gt;&lt;BR /&gt;If arg is - (or if arg is omitted and the first sig is numeric), reset all traps for each sig to their original values.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 19 Jul 2006 05:13:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/unix-command-trap/m-p/4991796#M100462</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-07-19T05:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: unix command trap</title>
      <link>https://community.hpe.com/t5/operating-system-linux/unix-command-trap/m-p/4991797#M100463</link>
      <description>&lt;BR /&gt;Thx for your useful answers !&lt;BR /&gt;&lt;BR /&gt;Tom</description>
      <pubDate>Wed, 19 Jul 2006 11:24:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/unix-command-trap/m-p/4991797#M100463</guid>
      <dc:creator>Billa-User</dc:creator>
      <dc:date>2006-07-19T11:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: unix command trap</title>
      <link>https://community.hpe.com/t5/operating-system-linux/unix-command-trap/m-p/4991798#M100464</link>
      <description>i got a answer to my question</description>
      <pubDate>Wed, 19 Jul 2006 11:26:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/unix-command-trap/m-p/4991798#M100464</guid>
      <dc:creator>Billa-User</dc:creator>
      <dc:date>2006-07-19T11:26:12Z</dc:date>
    </item>
  </channel>
</rss>

