<?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: circumstances in which relative path impact shell script in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/circumstances-in-which-relative-path-impact-shell-script/m-p/4646944#M41108</link>
    <description>The use of relative paths and "cd ../" looks OK to me.&lt;BR /&gt;&lt;BR /&gt;The error message says pretty clearly that the file "/var/log/payload_syslogs/payload_1/node_id" does not exist.&lt;BR /&gt;&lt;BR /&gt;Because your script creates the payload_1 sub-directory, the node_id file cannot pre-exist. Should the /etc/ncs/ncs_collect_payload_syslog command create that file? *Does* it create the file in fact?&lt;BR /&gt;&lt;BR /&gt;Your script redirects the error messages of the ncs_collect_payload_syslog command to the file named by the variable $COLLECT_LOG. What's in that file? Any informative error messages?&lt;BR /&gt;&lt;BR /&gt;MK</description>
    <pubDate>Mon, 14 Jun 2010 10:47:36 GMT</pubDate>
    <dc:creator>Matti_Kurkela</dc:creator>
    <dc:date>2010-06-14T10:47:36Z</dc:date>
    <item>
      <title>circumstances in which relative path impact shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/circumstances-in-which-relative-path-impact-shell-script/m-p/4646943#M41107</link>
      <description>Hi Guru,&lt;BR /&gt;&lt;BR /&gt;Ive written a script, but it seems sometime(not known) could not working. From console log i relaised it is sometimg relative path is impacting..also i never relaised this problem in develpoment phase. Here is code snippet.&lt;BR /&gt;&lt;BR /&gt;=========&lt;BR /&gt; for z in `seq $NO_PAYLOADS`; do&lt;BR /&gt;      FROM_PAYLOAD=${PAYLOD_IPADDR[$[z-1]]}&lt;BR /&gt;      mkdir -p /var/log/payload_syslogs&lt;BR /&gt;      cd /var/log/payload_syslogs&lt;BR /&gt;      mkdir -p payload_$z&lt;BR /&gt;      cd payload_$z&lt;BR /&gt;      echo "Collecting syslog,dmesg,fund_com_log from $FROM_PAYLOAD"&lt;BR /&gt;      /etc/ncs/ncs_collect_payload_syslog $FROM_PAYLOAD &amp;gt;&amp;gt;$COLLECT_LOG 2&amp;gt;&amp;amp;1&lt;BR /&gt;      cd ../&lt;BR /&gt;      SLOT_NO=`cat payload_$z/node_id` #problem happen here&lt;BR /&gt;      mv payload_$z payload_$SLOT_NO&lt;BR /&gt;      tar zcvmf payload_$SLOT_NO.tgz payload_$SLOT_NO&lt;BR /&gt;      rm -rf payload_$SLOT_NO&lt;BR /&gt;  done&lt;BR /&gt;==========&lt;BR /&gt;&lt;BR /&gt;Could you please let me know in which circumstances this relative path (as well cd ../) would not work?&lt;BR /&gt;&lt;BR /&gt;BR/MKS&lt;BR /&gt;&lt;BR /&gt;Note: Attched is console error print.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Jun 2010 03:51:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/circumstances-in-which-relative-path-impact-shell-script/m-p/4646943#M41107</guid>
      <dc:creator>monu_1</dc:creator>
      <dc:date>2010-06-14T03:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: circumstances in which relative path impact shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/circumstances-in-which-relative-path-impact-shell-script/m-p/4646944#M41108</link>
      <description>The use of relative paths and "cd ../" looks OK to me.&lt;BR /&gt;&lt;BR /&gt;The error message says pretty clearly that the file "/var/log/payload_syslogs/payload_1/node_id" does not exist.&lt;BR /&gt;&lt;BR /&gt;Because your script creates the payload_1 sub-directory, the node_id file cannot pre-exist. Should the /etc/ncs/ncs_collect_payload_syslog command create that file? *Does* it create the file in fact?&lt;BR /&gt;&lt;BR /&gt;Your script redirects the error messages of the ncs_collect_payload_syslog command to the file named by the variable $COLLECT_LOG. What's in that file? Any informative error messages?&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Mon, 14 Jun 2010 10:47:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/circumstances-in-which-relative-path-impact-shell-script/m-p/4646944#M41108</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2010-06-14T10:47:36Z</dc:date>
    </item>
  </channel>
</rss>

