<?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: awk,trap,sed in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-trap-sed/m-p/2852068#M93879</link>
    <description>1) parse file database, and take the colon ':' as field separator, then print the 2nd field whenever the 6th field equals the value of the value variable $serial holds.&lt;BR /&gt;&lt;BR /&gt;2) reset the default behaviour to signals 1 (SIGHUP), 2 (SIGINT), 3 (SIGQUIT), 18 (SIGCHLD),&lt;BR /&gt;assumably because a signal handler for these signals was defined earlier in the script&lt;BR /&gt;&lt;BR /&gt;3) from file database delete every line where the contents of variable $cserial matches, and redirect output to file delete&lt;BR /&gt;</description>
    <pubDate>Tue, 26 Nov 2002 09:31:55 GMT</pubDate>
    <dc:creator>Ralph Grothe</dc:creator>
    <dc:date>2002-11-26T09:31:55Z</dc:date>
    <item>
      <title>awk,trap,sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-trap-sed/m-p/2852066#M93877</link>
      <description>can anyone please explain to me what are these mean?&lt;BR /&gt;&lt;BR /&gt;1)`awk -F: '$6 == "'$serial'" {print $2}' database`"&lt;BR /&gt;&lt;BR /&gt;2)trap '' 1 2 3 18&lt;BR /&gt;&lt;BR /&gt;3)sed "/$cserial/d" database &amp;gt; delete&lt;BR /&gt;&lt;BR /&gt;thank you very much...</description>
      <pubDate>Tue, 26 Nov 2002 09:20:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-trap-sed/m-p/2852066#M93877</guid>
      <dc:creator>Alice_4</dc:creator>
      <dc:date>2002-11-26T09:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: awk,trap,sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-trap-sed/m-p/2852067#M93878</link>
      <description>Alice,&lt;BR /&gt;&lt;BR /&gt;1) split each line in "database" at the ":" character, and print the 2nd field if the 6th field is the value of $serial&lt;BR /&gt;&lt;BR /&gt;2) ignore signals 1, 2, 3, 18&lt;BR /&gt;&lt;BR /&gt;3) delete any lines containing the $cserial variable, and output the remaining lines to the file delete.&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin.</description>
      <pubDate>Tue, 26 Nov 2002 09:25:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-trap-sed/m-p/2852067#M93878</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2002-11-26T09:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: awk,trap,sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-trap-sed/m-p/2852068#M93879</link>
      <description>1) parse file database, and take the colon ':' as field separator, then print the 2nd field whenever the 6th field equals the value of the value variable $serial holds.&lt;BR /&gt;&lt;BR /&gt;2) reset the default behaviour to signals 1 (SIGHUP), 2 (SIGINT), 3 (SIGQUIT), 18 (SIGCHLD),&lt;BR /&gt;assumably because a signal handler for these signals was defined earlier in the script&lt;BR /&gt;&lt;BR /&gt;3) from file database delete every line where the contents of variable $cserial matches, and redirect output to file delete&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Nov 2002 09:31:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-trap-sed/m-p/2852068#M93879</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2002-11-26T09:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: awk,trap,sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-trap-sed/m-p/2852069#M93880</link>
      <description>Sorry Ralph, but Robin is right (perhaps Alice could give him points ???).&lt;BR /&gt;&lt;BR /&gt;1 - OK&lt;BR /&gt;&lt;BR /&gt;2 - IGNORE signals ... To restore to default handling you should have nothing between 'trap' and signals list (no '')&lt;BR /&gt;&lt;BR /&gt;3 - Only remaining lines are redirected to output file.&lt;BR /&gt;&lt;BR /&gt;Regards.</description>
      <pubDate>Tue, 26 Nov 2002 09:53:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-trap-sed/m-p/2852069#M93880</guid>
      <dc:creator>Jean-Louis Phelix</dc:creator>
      <dc:date>2002-11-26T09:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: awk,trap,sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-trap-sed/m-p/2852070#M93881</link>
      <description>Yes Jean-Loius,&lt;BR /&gt;&lt;BR /&gt;you both were right of course.&lt;BR /&gt;&lt;BR /&gt;I simply mistook it because I hardly ever set traps in shell scripts anymore but instead use Perl whenever I have to implement a signal handler somewhere, where you simply could say something like&lt;BR /&gt;&lt;BR /&gt;$SIG{HUP} = $SIG{INT} = $SIG{QUIT} = $SIG{CHLD} = 'IGNORE';&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Sorry, if I had noticed that Robin already has posted a reply I definitely wouldn't have responded at all.&lt;BR /&gt;So I guess we had a kind of race condition here.</description>
      <pubDate>Tue, 26 Nov 2002 17:45:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-trap-sed/m-p/2852070#M93881</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2002-11-26T17:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: awk,trap,sed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-trap-sed/m-p/2852071#M93882</link>
      <description>thank you guys..all of you really do help me a lot with the answers you all gave to me...</description>
      <pubDate>Thu, 28 Nov 2002 12:52:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-trap-sed/m-p/2852071#M93882</guid>
      <dc:creator>Alice_4</dc:creator>
      <dc:date>2002-11-28T12:52:22Z</dc:date>
    </item>
  </channel>
</rss>

