<?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: error_in script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557719#M678944</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Thanks for the correction.&lt;BR /&gt;&lt;BR /&gt;i replaced the as per your suggestion.&lt;BR /&gt;&lt;BR /&gt;now am getting this error&lt;BR /&gt;&lt;BR /&gt;sh ecschk.sh&lt;BR /&gt;getting the events dump&lt;BR /&gt;now processing events&lt;BR /&gt;ecschk.sh[10]: Jan: A test command parameter is not valid.&lt;BR /&gt;no action&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Also please tell me the diff in &amp;amp;&amp;amp; and -a.i dont have any experience in this.i just simply followed some sytax from google.&lt;BR /&gt;&lt;BR /&gt;THANKS</description>
    <pubDate>Mon, 04 Jan 2010 10:05:46 GMT</pubDate>
    <dc:creator>Soul_1</dc:creator>
    <dc:date>2010-01-04T10:05:46Z</dc:date>
    <item>
      <title>error_in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557717#M678942</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;While executing this script&lt;BR /&gt;&lt;BR /&gt;#################&lt;BR /&gt;echo "getting the events dump"&lt;BR /&gt;Date=$(date)&lt;BR /&gt;/opt/OV/bin/ovdumpevents &amp;gt; events&lt;BR /&gt;echo "now processing events"&lt;BR /&gt;more events |grep OVpatternDelete &amp;gt;list&lt;BR /&gt;Value=$(tail -1 list|awk '{print $8}')&lt;BR /&gt;EvDate=$(tail -1 list|awk '{print $3, $4, $5, $6, $7}'|cut -c -8,10-)&lt;BR /&gt;if [ ${Value} = "OVpatternDelete" &amp;amp;&amp;amp; ${Date} = ${EvDate} ]&lt;BR /&gt;then&lt;BR /&gt;echo "processing mail"&lt;BR /&gt;else&lt;BR /&gt;echo "no action"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;i am getting the following error.&lt;BR /&gt;&lt;BR /&gt;# sh ecschk.sh&lt;BR /&gt;getting the events dump&lt;BR /&gt;now processing events&lt;BR /&gt;ecschk.sh[10]: test: A ] character is missing.&lt;BR /&gt;no action&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;please help me to solve this.&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; Regards&lt;BR /&gt;</description>
      <pubDate>Mon, 04 Jan 2010 09:27:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557717#M678942</guid>
      <dc:creator>Soul_1</dc:creator>
      <dc:date>2010-01-04T09:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: error_in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557718#M678943</link>
      <description>Hi, &lt;BR /&gt;replace&lt;BR /&gt;if [ ${Value} = "OVpatternDelete" &amp;amp;&amp;amp; ${Date} = ${EvDate} ]&lt;BR /&gt;by &lt;BR /&gt;if [ ${Value} = "OVpatternDelete" -a ${Date} = ${EvDate} ]&lt;BR /&gt;HTH&lt;BR /&gt;</description>
      <pubDate>Mon, 04 Jan 2010 09:49:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557718#M678943</guid>
      <dc:creator>smatador</dc:creator>
      <dc:date>2010-01-04T09:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: error_in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557719#M678944</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Thanks for the correction.&lt;BR /&gt;&lt;BR /&gt;i replaced the as per your suggestion.&lt;BR /&gt;&lt;BR /&gt;now am getting this error&lt;BR /&gt;&lt;BR /&gt;sh ecschk.sh&lt;BR /&gt;getting the events dump&lt;BR /&gt;now processing events&lt;BR /&gt;ecschk.sh[10]: Jan: A test command parameter is not valid.&lt;BR /&gt;no action&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Also please tell me the diff in &amp;amp;&amp;amp; and -a.i dont have any experience in this.i just simply followed some sytax from google.&lt;BR /&gt;&lt;BR /&gt;THANKS</description>
      <pubDate>Mon, 04 Jan 2010 10:05:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557719#M678944</guid>
      <dc:creator>Soul_1</dc:creator>
      <dc:date>2010-01-04T10:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: error_in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557720#M678945</link>
      <description>one of the variables you set is probably evaluating to nothing - so you might want to try:&lt;BR /&gt;&lt;BR /&gt;if [ "${Value}" = "OVpatternDelete" -a "${Date}" = "${EvDate}" ] &lt;BR /&gt;&lt;BR /&gt;The &amp;amp;&amp;amp; syntax for "and" doesn't work in a test statement in the HP-UX POSIX shell - the code you got from google was probably for another shell which supports both syntaxes...&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Mon, 04 Jan 2010 10:52:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557720#M678945</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2010-01-04T10:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: error in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557721#M678946</link>
      <description>&lt;P&gt;&amp;gt;Duncan: The &amp;amp;&amp;amp; syntax for "and" doesn't work in a test statement in the HP-UX POSIX shell&lt;BR /&gt;&lt;BR /&gt;If you want to use &amp;amp;&amp;amp;, you need to use [[ ]]:&lt;BR /&gt;if [[ "${Value}" = "OVpatternDelete" &amp;amp;&amp;amp; "${Date}" = "${EvDate}" ]]; then&lt;/P&gt;</description>
      <pubDate>Sat, 27 Aug 2011 11:30:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557721#M678946</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-08-27T11:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: error_in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557722#M678947</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Thanks a lot for the information.&lt;BR /&gt;&lt;BR /&gt;now i am facing another error while executing. This command will be executed by the application (as user bin ).i tried a lot with changing permission and all . please have a look into this &lt;BR /&gt;&lt;BR /&gt;Tue Jan 05 12:57:38 Command "/usr/sbin/evdel.sh" returned standard error data:&lt;BR /&gt;/usr/sbin/evdel.sh[5]: /tmp/ActionNNM/events: Cannot create the specified file.&lt;BR /&gt;/tmp/ActionNNM/events: No such file or directory&lt;BR /&gt;list: No such file or directory&lt;BR /&gt;rm: events non-existent&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 05 Jan 2010 07:34:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557722#M678947</guid>
      <dc:creator>Soul_1</dc:creator>
      <dc:date>2010-01-05T07:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: error in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557723#M678948</link>
      <description>&lt;P&gt;&amp;gt;This command will be executed by the application (as user bin).&lt;BR /&gt;&lt;BR /&gt;Typically bin isn't a real user. How are you logged into bin?)&lt;BR /&gt;&lt;BR /&gt;&amp;gt;"/usr/sbin/evdel.sh" returned standard error data:&lt;BR /&gt;/usr/sbin/evdel.sh[5]: /tmp/ActionNNM/events: Cannot create the specified file.&lt;BR /&gt;&lt;BR /&gt;Does the directory /tmp/ActionNNM exist? If not, you can always use "mkdir -p /tmp/ActionNNM" to make sure.&lt;BR /&gt;Does that directory have the right permission?&lt;BR /&gt;ll -d /tmp/ActionNNM&lt;/P&gt;</description>
      <pubDate>Sat, 27 Aug 2011 11:30:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557723#M678948</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-08-27T11:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: error_in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557724#M678949</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Thanks for the quick response.&lt;BR /&gt;&lt;BR /&gt;I didn't logged in as user bin.But when my application executes command as bin.&lt;BR /&gt;&lt;BR /&gt;ll /tmp/ActionNNM/&lt;BR /&gt;total 112&lt;BR /&gt;-rw-r--r--   1 bin        bin          19140 Jan  5 13:19 action.log&lt;BR /&gt;-rw-r--r--   1 bin        bin           2580 Jan  5 13:19 action1.log&lt;BR /&gt;drwxr-xr-x   2 root       sys           8192 Jan  5 12:44 back&lt;BR /&gt;-rwxr-xr-x   1 bin        bin            655 Jan  5 12:51 evdel.sh&lt;BR /&gt;-rw-r--r--   1 bin        bin            382 Jan  5 12:54 list&lt;BR /&gt;&lt;BR /&gt;Please check the permissions</description>
      <pubDate>Tue, 05 Jan 2010 07:52:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557724#M678949</guid>
      <dc:creator>Soul_1</dc:creator>
      <dc:date>2010-01-05T07:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: error_in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557725#M678950</link>
      <description># ll -d /tmp/ActionNNM&lt;BR /&gt;drwxr-xr-x   3 root       sys           8192 Jan  5 12:54 /tmp/ActionNNM&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Jan 2010 07:53:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557725#M678950</guid>
      <dc:creator>Soul_1</dc:creator>
      <dc:date>2010-01-05T07:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: error in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557726#M678951</link>
      <description>&lt;P&gt;&amp;gt;But when my application executes command as bin.&lt;BR /&gt;&lt;BR /&gt;That's pretty strange. It would make more sense to create a special user and not use one of the system UIDs.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;drwxr-xr-x 3 root sys 8192 Jan 5 12:54 /tmp/ActionNNM&lt;BR /&gt;&lt;BR /&gt;This does not allow user bin to create the file events. root must create the file and chown it to bin:bin, then bin can write to it.&lt;BR /&gt;Or maybe you should have bin own the directory?&lt;/P&gt;</description>
      <pubDate>Sat, 27 Aug 2011 11:31:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557726#M678951</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-08-27T11:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: error_in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557727#M678952</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; But when my application executes command as bin.&lt;BR /&gt;&lt;BR /&gt;Do you mean that you want files created by your application to be owned by 'bin'?&lt;BR /&gt;&lt;BR /&gt;If so, you can have the _group_ ownership set to 'bin' simply by setting the 'setgid' bit on the parent directory:&lt;BR /&gt;&lt;BR /&gt;# chgrp bin /tmp/ActionNNM&lt;BR /&gt;# chmod g+s /tmp/ActionNNM&lt;BR /&gt;&lt;BR /&gt;Now files createed in the directory will automatically have a group ownership of 'bin'.  The file's owner will remain that of the effective uid of the process creating them, but this is a way to grant group visability.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 05 Jan 2010 12:46:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-in-script/m-p/4557727#M678952</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-01-05T12:46:54Z</dc:date>
    </item>
  </channel>
</rss>

