<?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 script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3183414#M163313</link>
    <description>Hi there,&lt;BR /&gt;&lt;BR /&gt;I'm writing a C-Shell script and need to find out&lt;BR /&gt;if a file_x has certain pattern, which appears&lt;BR /&gt;once (or none) in a particular file.&lt;BR /&gt;  &lt;BR /&gt;I tried to use grep but cannot do the following:&lt;BR /&gt;set file_name = file_x&lt;BR /&gt;set num = grep pattern_x $file_name | wc -l &lt;BR /&gt;if ( $num == 1 ) then&lt;BR /&gt; .&lt;BR /&gt; .&lt;BR /&gt;&lt;BR /&gt;Any suggestion is appreciated.&lt;BR /&gt;&lt;BR /&gt;Reggie&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 04 Feb 2004 20:09:06 GMT</pubDate>
    <dc:creator>Reggie Chang</dc:creator>
    <dc:date>2004-02-04T20:09:06Z</dc:date>
    <item>
      <title>script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3183414#M163313</link>
      <description>Hi there,&lt;BR /&gt;&lt;BR /&gt;I'm writing a C-Shell script and need to find out&lt;BR /&gt;if a file_x has certain pattern, which appears&lt;BR /&gt;once (or none) in a particular file.&lt;BR /&gt;  &lt;BR /&gt;I tried to use grep but cannot do the following:&lt;BR /&gt;set file_name = file_x&lt;BR /&gt;set num = grep pattern_x $file_name | wc -l &lt;BR /&gt;if ( $num == 1 ) then&lt;BR /&gt; .&lt;BR /&gt; .&lt;BR /&gt;&lt;BR /&gt;Any suggestion is appreciated.&lt;BR /&gt;&lt;BR /&gt;Reggie&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Feb 2004 20:09:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3183414#M163313</guid>
      <dc:creator>Reggie Chang</dc:creator>
      <dc:date>2004-02-04T20:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3183415#M163314</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;simply use: grep -c   ?!&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Feb 2004 20:17:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3183415#M163314</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2004-02-04T20:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3183416#M163315</link>
      <description>Hein,&lt;BR /&gt;&lt;BR /&gt;Thank you for the info.&lt;BR /&gt;&lt;BR /&gt;I think the real problem is to use grep with&lt;BR /&gt;set.  Using grep -c would be easier, but set&lt;BR /&gt;does not work.&lt;BR /&gt;&lt;BR /&gt;Reggie</description>
      <pubDate>Wed, 04 Feb 2004 20:35:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3183416#M163315</guid>
      <dc:creator>Reggie Chang</dc:creator>
      <dc:date>2004-02-04T20:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3183417#M163316</link>
      <description>Hein,&lt;BR /&gt;&lt;BR /&gt;I got the solution.&lt;BR /&gt;set par = `grep ........` is the way.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;Reggie</description>
      <pubDate>Wed, 04 Feb 2004 21:46:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/3183417#M163316</guid>
      <dc:creator>Reggie Chang</dc:creator>
      <dc:date>2004-02-04T21:46:02Z</dc:date>
    </item>
  </channel>
</rss>

