<?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: script not executing properly ??? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-not-executing-properly/m-p/3322167#M712166</link>
    <description>Your qtn:-&lt;BR /&gt;&lt;BR /&gt;my first command line arg is a file having no permission. but script is excuting properly&lt;BR /&gt;How?&lt;BR /&gt;&lt;BR /&gt;Ans :-&lt;BR /&gt;&lt;BR /&gt;Are running it as root ?&lt;BR /&gt;&lt;BR /&gt;Kaps</description>
    <pubDate>Sat, 03 Jul 2004 08:55:47 GMT</pubDate>
    <dc:creator>KapilRaj</dc:creator>
    <dc:date>2004-07-03T08:55:47Z</dc:date>
    <item>
      <title>script not executing properly ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-not-executing-properly/m-p/3322162#M712161</link>
      <description>Hi experts,&lt;BR /&gt;&lt;BR /&gt; I attached one script for very basic copying to files with certain conditions.&lt;BR /&gt; First condition is ok but after it is not executing further.&lt;BR /&gt; If disable the second condition then also it is not copying the files. &lt;BR /&gt;&lt;BR /&gt; Help me in this case. &lt;BR /&gt;Explain me details please.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;Shan&lt;BR /&gt;</description>
      <pubDate>Sat, 03 Jul 2004 03:08:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-not-executing-properly/m-p/3322162#M712161</guid>
      <dc:creator>shan_7</dc:creator>
      <dc:date>2004-07-03T03:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: script not executing properly ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-not-executing-properly/m-p/3322163#M712162</link>
      <description>found condition 6 bad..&lt;BR /&gt;&lt;BR /&gt;==========================&lt;BR /&gt;# condition 6&lt;BR /&gt;if [ "ANSWER" = "yes" ]   # &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; Change to $ANSWER&lt;BR /&gt;then&lt;BR /&gt;   cp $1 $2&lt;BR /&gt;   echo "file copied"&lt;BR /&gt;   exit 0&lt;BR /&gt;==========================&lt;BR /&gt;&lt;BR /&gt;It should be &lt;BR /&gt;&lt;BR /&gt;=========================&lt;BR /&gt;# condition 6&lt;BR /&gt;if [ "$ANSWER" = "yes" ]   # &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; Change to $ANSWER&lt;BR /&gt;then&lt;BR /&gt;   cp $1 $2&lt;BR /&gt;   echo "file copied"&lt;BR /&gt;   exit 0&lt;BR /&gt;====================&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regds,&lt;BR /&gt;&lt;BR /&gt;Kaps</description>
      <pubDate>Sat, 03 Jul 2004 03:23:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-not-executing-properly/m-p/3322163#M712162</guid>
      <dc:creator>KapilRaj</dc:creator>
      <dc:date>2004-07-03T03:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: script not executing properly ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-not-executing-properly/m-p/3322164#M712163</link>
      <description>If this is not yet fixed can u do a test run in debug mode and post the o/p?.&lt;BR /&gt;&lt;BR /&gt;set -x &lt;BR /&gt;./script file1 file2&lt;BR /&gt;&lt;BR /&gt;Regds,&lt;BR /&gt;&lt;BR /&gt;Kaps</description>
      <pubDate>Sat, 03 Jul 2004 03:57:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-not-executing-properly/m-p/3322164#M712163</guid>
      <dc:creator>KapilRaj</dc:creator>
      <dc:date>2004-07-03T03:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: script not executing properly ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-not-executing-properly/m-p/3322165#M712164</link>
      <description>Hai,&lt;BR /&gt;&lt;BR /&gt; Are you using the echo without messages for debugging. If so use set -x or set -v for that.&lt;BR /&gt;&lt;BR /&gt; set -x - it will give messages after command execution&lt;BR /&gt;&lt;BR /&gt; set -v - it will give the comman messages before execution.&lt;BR /&gt;&lt;BR /&gt; Change the if [ "ANSWER" = "yes" ] as&lt;BR /&gt;&lt;BR /&gt; if [ "$ANSWER" = "yes" ]&lt;BR /&gt;&lt;BR /&gt; change this echo "file copied with " at end.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Muthukumar</description>
      <pubDate>Sat, 03 Jul 2004 05:57:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-not-executing-properly/m-p/3322165#M712164</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-07-03T05:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: script not executing properly ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-not-executing-properly/m-p/3322166#M712165</link>
      <description>condition 1  :-&lt;BR /&gt;&lt;BR /&gt;check if there are two args if not exit&lt;BR /&gt;&lt;BR /&gt;condition 2  :- &lt;BR /&gt;&lt;BR /&gt;check if both the args are the same. if same exit&lt;BR /&gt;&lt;BR /&gt;condition 3 :-&lt;BR /&gt;&lt;BR /&gt;check source file is a normal file. if not exit&lt;BR /&gt;&lt;BR /&gt;condition 4 :-&lt;BR /&gt;&lt;BR /&gt;check if source file is readable &lt;BR /&gt;&lt;BR /&gt;condition 5 :-&lt;BR /&gt;&lt;BR /&gt;check if the file already exist. if exist check with the user if he wants to over write.&lt;BR /&gt;&lt;BR /&gt;condition 6 :-&lt;BR /&gt;&lt;BR /&gt;check user's input is "yes". if yes copy the file else quit ..&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regds,&lt;BR /&gt;&lt;BR /&gt;Kaps&lt;BR /&gt;check this thread as well.&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=140137" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=140137&lt;/A&gt;</description>
      <pubDate>Sat, 03 Jul 2004 08:43:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-not-executing-properly/m-p/3322166#M712165</guid>
      <dc:creator>KapilRaj</dc:creator>
      <dc:date>2004-07-03T08:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: script not executing properly ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-not-executing-properly/m-p/3322167#M712166</link>
      <description>Your qtn:-&lt;BR /&gt;&lt;BR /&gt;my first command line arg is a file having no permission. but script is excuting properly&lt;BR /&gt;How?&lt;BR /&gt;&lt;BR /&gt;Ans :-&lt;BR /&gt;&lt;BR /&gt;Are running it as root ?&lt;BR /&gt;&lt;BR /&gt;Kaps</description>
      <pubDate>Sat, 03 Jul 2004 08:55:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-not-executing-properly/m-p/3322167#M712166</guid>
      <dc:creator>KapilRaj</dc:creator>
      <dc:date>2004-07-03T08:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: script not executing properly ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-not-executing-properly/m-p/3322168#M712167</link>
      <description>This is working and modified script.&lt;BR /&gt;&lt;BR /&gt;Thanks,</description>
      <pubDate>Sat, 03 Jul 2004 09:15:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-not-executing-properly/m-p/3322168#M712167</guid>
      <dc:creator>SAHA</dc:creator>
      <dc:date>2004-07-03T09:15:45Z</dc:date>
    </item>
  </channel>
</rss>

