<?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: Need Help2 in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help2/m-p/2634197#M850150</link>
    <description>On server B&lt;BR /&gt;&lt;BR /&gt;EXIT_VAL=`remsh servera myquery.sh passed_value`&lt;BR /&gt;echo "Status us $EXIT_VAL"&lt;BR /&gt;&lt;BR /&gt;On server A create myquery.sh to be&lt;BR /&gt;&lt;BR /&gt;sqlplus -s user/Password@oracle @script.sql $1 &lt;BR /&gt;COUNT=`tail -2 $1.lst | wc -l`&lt;BR /&gt;if [ $COUNT -eq 2 ]&lt;BR /&gt;then&lt;BR /&gt;  echo "1"&lt;BR /&gt;else&lt;BR /&gt;  echo "0"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Notes:&lt;BR /&gt;&lt;BR /&gt;You cannot use $? on remsh becuase it returns the value of remsh not the script you call. &lt;BR /&gt;Also I am assuming by your code segment you return true if there are two lines in the file?  You can tweak the if to fit whatever you  need&lt;BR /&gt;</description>
    <pubDate>Thu, 20 Dec 2001 19:39:39 GMT</pubDate>
    <dc:creator>Jeff Machols</dc:creator>
    <dc:date>2001-12-20T19:39:39Z</dc:date>
    <item>
      <title>Need Help2</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help2/m-p/2634196#M850149</link>
      <description>Ok, let says that I need a c script for this. How should I do it as I'm not well verse in c script. &lt;BR /&gt;&lt;BR /&gt;My shell script as follows and I need a c script: &lt;BR /&gt;&lt;BR /&gt;1. I need to remsh to server A as my script.sql is located in that server&lt;BR /&gt;&lt;BR /&gt;2. I need to pass in a employee name to get his/her salary. How to pass it in? &lt;BR /&gt;&lt;BR /&gt;sqlplus -s user/Password@oracle @script.sql $1 &lt;BR /&gt;tail -2 $1.lst &amp;gt; $1.tmp &lt;BR /&gt;mv $1.tmp $1.lst &lt;BR /&gt;&lt;BR /&gt;3. In the same script I need to return the value. If file exist then I need to return a 1 value and if file did not exist then I return 0 value. &lt;BR /&gt;</description>
      <pubDate>Thu, 20 Dec 2001 18:46:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help2/m-p/2634196#M850149</guid>
      <dc:creator>System Dude_1</dc:creator>
      <dc:date>2001-12-20T18:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help2</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help2/m-p/2634197#M850150</link>
      <description>On server B&lt;BR /&gt;&lt;BR /&gt;EXIT_VAL=`remsh servera myquery.sh passed_value`&lt;BR /&gt;echo "Status us $EXIT_VAL"&lt;BR /&gt;&lt;BR /&gt;On server A create myquery.sh to be&lt;BR /&gt;&lt;BR /&gt;sqlplus -s user/Password@oracle @script.sql $1 &lt;BR /&gt;COUNT=`tail -2 $1.lst | wc -l`&lt;BR /&gt;if [ $COUNT -eq 2 ]&lt;BR /&gt;then&lt;BR /&gt;  echo "1"&lt;BR /&gt;else&lt;BR /&gt;  echo "0"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Notes:&lt;BR /&gt;&lt;BR /&gt;You cannot use $? on remsh becuase it returns the value of remsh not the script you call. &lt;BR /&gt;Also I am assuming by your code segment you return true if there are two lines in the file?  You can tweak the if to fit whatever you  need&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Dec 2001 19:39:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help2/m-p/2634197#M850150</guid>
      <dc:creator>Jeff Machols</dc:creator>
      <dc:date>2001-12-20T19:39:39Z</dc:date>
    </item>
  </channel>
</rss>

