<?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: Input to command automatically in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/input-to-command-automatically/m-p/4599022#M679695</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;If you use sqlplus (x=sqlplus), you could make a sql script (your select/insert/whatever/quit will go there) and then se something like this:&lt;BR /&gt;&lt;BR /&gt;sqlplus  -s '/ as sysdba' @yourscript.sql &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you script would use some variable, you can add that variable at the end of this command like this:&lt;BR /&gt;&lt;BR /&gt;sqlplus  -s '/ as sysdba' @yourscript.sql $variable1&lt;BR /&gt;&lt;BR /&gt;In your script.sql you can access that variable by $1.&lt;BR /&gt;&lt;BR /&gt;Horia.</description>
    <pubDate>Thu, 11 Mar 2010 09:38:16 GMT</pubDate>
    <dc:creator>Horia Chirculescu</dc:creator>
    <dc:date>2010-03-11T09:38:16Z</dc:date>
    <item>
      <title>Input to command automatically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/input-to-command-automatically/m-p/4599021#M679694</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;i want to give input to a command automatically.&lt;BR /&gt;&lt;BR /&gt;for Example:&lt;BR /&gt;Normally i have to run the command say "x" for intiating sql query and afterwards ihave to give the sql commands and press enter&lt;BR /&gt;&lt;BR /&gt;#x &lt;ENTER&gt;&lt;BR /&gt;SQL&amp;gt;select * from data_detail; &lt;ENTER&gt;&lt;BR /&gt;quit;&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;i need to auomate this .Please help me&lt;BR /&gt;&lt;BR /&gt;Cheers !!&lt;/ENTER&gt;&lt;/ENTER&gt;</description>
      <pubDate>Thu, 11 Mar 2010 09:14:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/input-to-command-automatically/m-p/4599021#M679694</guid>
      <dc:creator>Soul_1</dc:creator>
      <dc:date>2010-03-11T09:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Input to command automatically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/input-to-command-automatically/m-p/4599022#M679695</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;If you use sqlplus (x=sqlplus), you could make a sql script (your select/insert/whatever/quit will go there) and then se something like this:&lt;BR /&gt;&lt;BR /&gt;sqlplus  -s '/ as sysdba' @yourscript.sql &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you script would use some variable, you can add that variable at the end of this command like this:&lt;BR /&gt;&lt;BR /&gt;sqlplus  -s '/ as sysdba' @yourscript.sql $variable1&lt;BR /&gt;&lt;BR /&gt;In your script.sql you can access that variable by $1.&lt;BR /&gt;&lt;BR /&gt;Horia.</description>
      <pubDate>Thu, 11 Mar 2010 09:38:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/input-to-command-automatically/m-p/4599022#M679695</guid>
      <dc:creator>Horia Chirculescu</dc:creator>
      <dc:date>2010-03-11T09:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Input to command automatically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/input-to-command-automatically/m-p/4599023#M679696</link>
      <description>&amp;gt; by $1.&lt;BR /&gt;&lt;BR /&gt;Sorry, it is &amp;amp;1. Read manual for sqlplus.&lt;BR /&gt;&lt;BR /&gt;Horia.&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Mar 2010 09:39:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/input-to-command-automatically/m-p/4599023#M679696</guid>
      <dc:creator>Horia Chirculescu</dc:creator>
      <dc:date>2010-03-11T09:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Input to command automatically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/input-to-command-automatically/m-p/4599024#M679697</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;You could use a here-document:&lt;BR /&gt;&lt;BR /&gt;sqlplus &amp;lt;</description>
      <pubDate>Thu, 11 Mar 2010 12:40:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/input-to-command-automatically/m-p/4599024#M679697</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-03-11T12:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Input to command automatically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/input-to-command-automatically/m-p/4599025#M679698</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;# cat sample.sh&lt;BR /&gt;&lt;BR /&gt;echo "..."&lt;BR /&gt;sqlplus / sample.sql&lt;BR /&gt;ERR=$(grep 'ORA-' sample.log)&lt;BR /&gt;&lt;BR /&gt;if [ "$ERR" = "" ]&lt;BR /&gt;then&lt;BR /&gt;  echo "SAMPLE: OK."&lt;BR /&gt;else&lt;BR /&gt;  echo "sample: ERROR"&lt;BR /&gt;   exit 3&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# cat sample.sql&lt;BR /&gt;&lt;BR /&gt;spool sample.log&lt;BR /&gt;select * from data_detail;&lt;BR /&gt;spool off&lt;BR /&gt;exit;&lt;BR /&gt;&lt;BR /&gt;Rgs,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Mar 2010 13:34:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/input-to-command-automatically/m-p/4599025#M679698</guid>
      <dc:creator>rariasn</dc:creator>
      <dc:date>2010-03-11T13:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Input to command automatically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/input-to-command-automatically/m-p/4599026#M679699</link>
      <description>Hello,&lt;BR /&gt;don't use sqlplus user/password but:&lt;BR /&gt;sqlplus&lt;BR /&gt;conn user/password&lt;BR /&gt;....&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;reason why is that by 'ps -ef|grep [s]lplus' in the first way it's possible to cach database password!!&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Fri, 12 Mar 2010 08:25:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/input-to-command-automatically/m-p/4599026#M679699</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2010-03-12T08:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: Input to command automatically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/input-to-command-automatically/m-p/4599027#M679700</link>
      <description>Hello,&lt;BR /&gt;don't use sqlplus user/password but:&lt;BR /&gt;sqlplus&lt;BR /&gt;conn user/password&lt;BR /&gt;....&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;reason why is that by 'ps -ef|grep [s]qlplus' in the first way it is possible to cach database password!!&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Fri, 12 Mar 2010 08:28:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/input-to-command-automatically/m-p/4599027#M679700</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2010-03-12T08:28:51Z</dc:date>
    </item>
  </channel>
</rss>

