<?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: what wrong with this script? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/what-wrong-with-this-script/m-p/2757644#M71740</link>
    <description>hello sunny,&lt;BR /&gt;&lt;BR /&gt;i have one script that does something similar. &lt;BR /&gt;(see attachment)&lt;BR /&gt;&lt;BR /&gt;Hope it helps&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Yogeeraj</description>
    <pubDate>Fri, 05 Jul 2002 05:34:56 GMT</pubDate>
    <dc:creator>Yogeeraj_1</dc:creator>
    <dc:date>2002-07-05T05:34:56Z</dc:date>
    <item>
      <title>what wrong with this script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-wrong-with-this-script/m-p/2757640#M71736</link>
      <description>Hi, friends&lt;BR /&gt;  I exec follow script &lt;BR /&gt;control=$(cat /tmp/scripts/numero_lineas.log |wc -l) &lt;BR /&gt;actual=$(cat /tmp/scripts/numero_lineas.txt) &lt;BR /&gt;if [ $control -gt $actual ];then &lt;BR /&gt;echo "New lines in logfile" &lt;BR /&gt;echo $control &amp;gt; /tmp/scripts/numero_lineas.txt &lt;BR /&gt;fi &lt;BR /&gt;   but error appear:: [3]: test: The specified number is not valid for this command.&lt;BR /&gt;   how to do with it?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Sunny</description>
      <pubDate>Thu, 04 Jul 2002 06:25:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-wrong-with-this-script/m-p/2757640#M71736</guid>
      <dc:creator>faust2004</dc:creator>
      <dc:date>2002-07-04T06:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: what wrong with this script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-wrong-with-this-script/m-p/2757641#M71737</link>
      <description>&lt;BR /&gt;You forgot the |wc -l on the line starting;&lt;BR /&gt;actual=&lt;BR /&gt;It should look like;&lt;BR /&gt;actual=$(cat /tmp/scripts/numero_lineas.txt|wc -l)&lt;BR /&gt;&lt;BR /&gt;Then the test (if ..-gt) will work as its comparing 2 numbers.&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Jul 2002 06:28:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-wrong-with-this-script/m-p/2757641#M71737</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2002-07-04T06:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: what wrong with this script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-wrong-with-this-script/m-p/2757642#M71738</link>
      <description>It depends whats in /tmp/scripts/numero_lineas.txt.  My guess is thatyou're trying to compare a number $control with a string $actual which will be the contents of /tmp/scripts/numero_lineas.txt.  It may be that you just need to add | wc -l to the command for $actual e.g. actual=$(cat /tmp/scripts/numero_lineas.txt | wc -l)&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Jul 2002 06:31:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-wrong-with-this-script/m-p/2757642#M71738</guid>
      <dc:creator>Jonathan Baker</dc:creator>
      <dc:date>2002-07-04T06:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: what wrong with this script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-wrong-with-this-script/m-p/2757643#M71739</link>
      <description>&lt;BR /&gt;I can see what youre doing now, the actual line is supposed to equal what is in the file numero_lineas.txt (which should contain 1 line which has a number). However, when you do your first test does this file have any content ? It should contain only 1 line with a number in it, eg. echo 1 &amp;gt; numero_lineas.txt&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Jul 2002 06:35:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-wrong-with-this-script/m-p/2757643#M71739</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2002-07-04T06:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: what wrong with this script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-wrong-with-this-script/m-p/2757644#M71740</link>
      <description>hello sunny,&lt;BR /&gt;&lt;BR /&gt;i have one script that does something similar. &lt;BR /&gt;(see attachment)&lt;BR /&gt;&lt;BR /&gt;Hope it helps&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Yogeeraj</description>
      <pubDate>Fri, 05 Jul 2002 05:34:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-wrong-with-this-script/m-p/2757644#M71740</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2002-07-05T05:34:56Z</dc:date>
    </item>
  </channel>
</rss>

