<?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: glance fails from a script, ok from command line in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-fails-from-a-script-ok-from-command-line/m-p/2519238#M23372</link>
    <description>Try with chmod 777  /opt/perf/bin/glance and if it's ok return  -r-sr-xr-x.</description>
    <pubDate>Thu, 19 Apr 2001 21:29:40 GMT</pubDate>
    <dc:creator>Vincenzo Restuccia</dc:creator>
    <dc:date>2001-04-19T21:29:40Z</dc:date>
    <item>
      <title>glance fails from a script, ok from command line</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-fails-from-a-script-ok-from-command-line/m-p/2519236#M23370</link>
      <description>I can run the following from the command line just fine: &lt;BR /&gt;&lt;BR /&gt;glance -adviser_only -syntax adviser.syntax -j60 &amp;gt; glance.out 2&amp;gt;glance.err &amp;amp; &lt;BR /&gt;&lt;BR /&gt;The process continues to run in the background until a 'kill' is executed. But if I do: &lt;BR /&gt;&lt;BR /&gt;sh &lt;THE same="" command="" line=""&gt; &lt;BR /&gt;&lt;BR /&gt;the background glance process terminates immediately, while the following gets logged to glance.err: &lt;BR /&gt;&lt;BR /&gt;sh: glance: Execute permission denied. &lt;BR /&gt;&lt;BR /&gt;Can you help me figure out the cause of the problem? &lt;BR /&gt;&lt;BR /&gt;My userid is 0 (root), default shell: /usr/bin/sh .  The output of 'll /opt/perf/bin/glance' is: &lt;BR /&gt;&lt;BR /&gt;-r-sr-xr-x   1 root       bin         614400 Oct  6  2000 /opt/perf/bin/glance&lt;/THE&gt;</description>
      <pubDate>Thu, 19 Apr 2001 20:54:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-fails-from-a-script-ok-from-command-line/m-p/2519236#M23370</guid>
      <dc:creator>Mladen Despic</dc:creator>
      <dc:date>2001-04-19T20:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: glance fails from a script, ok from command line</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-fails-from-a-script-ok-from-command-line/m-p/2519237#M23371</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;The problem has nothing to do with 'glance' but rather the way in which you use 'sh' to invoke it.&lt;BR /&gt;&lt;BR /&gt;Consider:&lt;BR /&gt;&lt;BR /&gt;# date #...works, obviously&lt;BR /&gt;# sh date # ...gives Execute permission denied.&lt;BR /&gt;# sh -c date #...works&lt;BR /&gt;&lt;BR /&gt;The '-c' option means read commands from the string which follows.  Thus, in you case:&lt;BR /&gt;&lt;BR /&gt;# sh -c "glance -adviser_only -syntax adviser.syntax -j60 &amp;gt;glance.out 2&amp;gt;glance.err &amp;amp;"&lt;BR /&gt;&lt;BR /&gt;...will provide that which you seek.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 19 Apr 2001 21:19:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-fails-from-a-script-ok-from-command-line/m-p/2519237#M23371</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-04-19T21:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: glance fails from a script, ok from command line</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-fails-from-a-script-ok-from-command-line/m-p/2519238#M23372</link>
      <description>Try with chmod 777  /opt/perf/bin/glance and if it's ok return  -r-sr-xr-x.</description>
      <pubDate>Thu, 19 Apr 2001 21:29:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-fails-from-a-script-ok-from-command-line/m-p/2519238#M23372</guid>
      <dc:creator>Vincenzo Restuccia</dc:creator>
      <dc:date>2001-04-19T21:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: glance fails from a script, ok from command line</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-fails-from-a-script-ok-from-command-line/m-p/2519239#M23373</link>
      <description>Thank you ...</description>
      <pubDate>Fri, 20 Apr 2001 02:49:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-fails-from-a-script-ok-from-command-line/m-p/2519239#M23373</guid>
      <dc:creator>Mladen Despic</dc:creator>
      <dc:date>2001-04-20T02:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: glance fails from a script, ok from command line</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-fails-from-a-script-ok-from-command-line/m-p/2519240#M23374</link>
      <description>I am trying to run a glance adviser script via cron.  From the command line it works great.  But from cron seems to just pass over the line.  Here is my command:&lt;BR /&gt;&lt;BR /&gt;sh -c "glance -adviser_only -syntax $DIR/gpm -iterations 3 -j 30 &amp;gt;&amp;gt; $DIR/glance.&lt;BR /&gt;out &amp;amp;"&lt;BR /&gt;&lt;BR /&gt;I get the output file glance.out but it's empty.  I have put a date command before and after the command, and within 1 second both dates return.&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 22 May 2001 18:57:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-fails-from-a-script-ok-from-command-line/m-p/2519240#M23374</guid>
      <dc:creator>Dave Jadischke</dc:creator>
      <dc:date>2001-05-22T18:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: glance fails from a script, ok from command line</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-fails-from-a-script-ok-from-command-line/m-p/2519241#M23375</link>
      <description>Dave,&lt;BR /&gt;&lt;BR /&gt;I think you need to use the full path:&lt;BR /&gt;&lt;BR /&gt;sh -c "/opt/perf/bin/glance -adviser_only -syntax $DIR/gpm -iterations 3 -j 30 &amp;gt;&amp;gt; $DIR/glance.out &amp;amp;&lt;BR /&gt;&lt;BR /&gt;Mladen</description>
      <pubDate>Tue, 22 May 2001 19:23:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-fails-from-a-script-ok-from-command-line/m-p/2519241#M23375</guid>
      <dc:creator>Mladen Despic</dc:creator>
      <dc:date>2001-05-22T19:23:09Z</dc:date>
    </item>
  </channel>
</rss>

