<?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 xterm + script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/xterm-script/m-p/2740468#M946722</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;1. Can any one tell me why this error "xterm: can't execvp /abc.sh" is appearing on the xterm window when I ran this command on the prompt "$ xterm -e abc.sh"?.&lt;BR /&gt;&lt;BR /&gt;2. The abc.sh script exits with value "5" but after execution of this abc.sh with xterm its returning only 0 when I did echo $?.  How do I get the return value 5 to the calling shell?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Vasu</description>
    <pubDate>Sat, 08 Jun 2002 10:17:46 GMT</pubDate>
    <dc:creator>Vasudevan MV</dc:creator>
    <dc:date>2002-06-08T10:17:46Z</dc:date>
    <item>
      <title>xterm + script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/xterm-script/m-p/2740468#M946722</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;1. Can any one tell me why this error "xterm: can't execvp /abc.sh" is appearing on the xterm window when I ran this command on the prompt "$ xterm -e abc.sh"?.&lt;BR /&gt;&lt;BR /&gt;2. The abc.sh script exits with value "5" but after execution of this abc.sh with xterm its returning only 0 when I did echo $?.  How do I get the return value 5 to the calling shell?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Vasu</description>
      <pubDate>Sat, 08 Jun 2002 10:17:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/xterm-script/m-p/2740468#M946722</guid>
      <dc:creator>Vasudevan MV</dc:creator>
      <dc:date>2002-06-08T10:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: xterm + script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/xterm-script/m-p/2740469#M946723</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;BR /&gt;&lt;BR /&gt;# exec xterm -e "abc.sh 2\&amp;gt; /tmp/abc.err"&lt;BR /&gt;# ERRORCODE=`cat /tmp/abc.err`&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Sat, 08 Jun 2002 15:15:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/xterm-script/m-p/2740469#M946723</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-06-08T15:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: xterm + script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/xterm-script/m-p/2740470#M946724</link>
      <description>Steven,&lt;BR /&gt;&lt;BR /&gt;I have tried your commands, but still I am getting the same error "xterm: can't execvp /abc.sh 2\&amp;gt;/dev/null".&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Vasu&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Jun 2002 04:31:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/xterm-script/m-p/2740470#M946724</guid>
      <dc:creator>Vasudevan MV</dc:creator>
      <dc:date>2002-06-10T04:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: xterm + script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/xterm-script/m-p/2740471#M946725</link>
      <description>Add the line to your script as the first line.example to execute it in bourne shell&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Jun 2002 04:43:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/xterm-script/m-p/2740471#M946725</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2002-06-10T04:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: xterm + script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/xterm-script/m-p/2740472#M946726</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Make sure that your script has executable permissions i.e.&lt;BR /&gt;&lt;BR /&gt;bash-2.05a$ chmod +x ./abc.sh&lt;BR /&gt;&lt;BR /&gt;You can fix the return code issue by using a wrapper script i.e. startabc.sh: &lt;BR /&gt;&lt;BR /&gt;bash-2.05a$ cat ./abc.sh&lt;BR /&gt;echo this is a test&lt;BR /&gt;adfasdf&lt;BR /&gt;bash-2.05a$ ./abc.sh&lt;BR /&gt;this is a test&lt;BR /&gt;./abc.sh: adfasdf: command not found&lt;BR /&gt;bash-2.05a$ echo $?&lt;BR /&gt;127&lt;BR /&gt;bash-2.05a$ rm /tmp/abc.err&lt;BR /&gt;bash-2.05a$ cat ./startabc.sh&lt;BR /&gt;./abc.sh&lt;BR /&gt;echo "$?" &amp;gt; /tmp/abc.err&lt;BR /&gt;bash-2.05a$ xterm -e ./startabc.sh&lt;BR /&gt;bash-2.05a$ cat /tmp/abc.err&lt;BR /&gt;127&lt;BR /&gt;&lt;BR /&gt;Make sure that ./abc.sh and ./startabc.sh has executable permissions.&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Mon, 10 Jun 2002 05:01:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/xterm-script/m-p/2740472#M946726</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-06-10T05:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: xterm + script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/xterm-script/m-p/2740473#M946727</link>
      <description>Steven,&lt;BR /&gt;&lt;BR /&gt;My script looks like this&lt;BR /&gt;&lt;BR /&gt;startabc.sh&lt;BR /&gt;--------------&lt;BR /&gt;xterm -e ./abc.sh&lt;BR /&gt;echo $?&lt;BR /&gt;&lt;BR /&gt;abc.sh&lt;BR /&gt;-------&lt;BR /&gt;echo "hello"&lt;BR /&gt;exit 5&lt;BR /&gt;&lt;BR /&gt;When I ran startabc.sh it always return 0 &amp;amp; in the xterm session sometimes the error is coming up "xterm: can't execvp /abc.sh"?.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Vasu&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Jun 2002 05:41:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/xterm-script/m-p/2740473#M946727</guid>
      <dc:creator>Vasudevan MV</dc:creator>
      <dc:date>2002-06-10T05:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: xterm + script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/xterm-script/m-p/2740474#M946728</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;&amp;gt; xterm -e ./abc.sh &lt;BR /&gt;&amp;gt; echo $? &lt;BR /&gt;&lt;BR /&gt;xterm spawns off a separate shell that does not return the exit code (return code) to the parent shell that spawned off xterm.&lt;BR /&gt;&lt;BR /&gt;Thus, to workaround this limitation, you have to echo the "$?" to a file and read from that file in your startabc.sh script:&lt;BR /&gt;&lt;BR /&gt;./startabc.sh:&lt;BR /&gt;=============&lt;BR /&gt;./abc.sh &lt;BR /&gt;echo "$?" &amp;gt; /tmp/abc.err &lt;BR /&gt;&lt;BR /&gt;Then you run this:&lt;BR /&gt;&lt;BR /&gt;# xterm -e ./startabc.sh &lt;BR /&gt;# cat /tmp/abc.err # this displays the return code&lt;BR /&gt;&lt;BR /&gt;If you want, you can put these two lines in another wrapper so that the return code is automatically displayed.&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Mon, 10 Jun 2002 05:54:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/xterm-script/m-p/2740474#M946728</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-06-10T05:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: xterm + script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/xterm-script/m-p/2740475#M946729</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;try adding the pathname to xterm and abc.sh&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;                   Steve Steel</description>
      <pubDate>Mon, 10 Jun 2002 10:15:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/xterm-script/m-p/2740475#M946729</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-06-10T10:15:28Z</dc:date>
    </item>
  </channel>
</rss>

