<?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 problem in reading parm file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem-in-reading-parm-file/m-p/4881980#M400686</link>
    <description>Hi,&lt;BR /&gt;can first check that the filenames are ok with: &lt;BR /&gt;ls -b PD_ODS.s_m_FHOPEHS_TO_ODS_OTHERS_ALL_*&lt;BR /&gt;This should eliminate any filename corruption.&lt;BR /&gt;Secondly why do you have a "&amp;gt; tparam_file"&lt;BR /&gt;at the end of your loop?&lt;BR /&gt;Regards</description>
    <pubDate>Tue, 25 Jan 2005 04:47:32 GMT</pubDate>
    <dc:creator>Peter Godron</dc:creator>
    <dc:date>2005-01-25T04:47:32Z</dc:date>
    <item>
      <title>script problem in reading parm file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem-in-reading-parm-file/m-p/4881979#M400685</link>
      <description>portion of the script:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;. test.ini&lt;BR /&gt;cp $param_file2 $param_file_bak2&lt;BR /&gt;&lt;BR /&gt;cat $param_file2 &amp;gt; a.log&lt;BR /&gt;echo "----below is the reading value ------" &amp;gt;&amp;gt; a.log&lt;BR /&gt;for i in `cat $param_file2`&lt;BR /&gt;do&lt;BR /&gt;echo $i&lt;BR /&gt;echo $i &amp;gt;&amp;gt; a.log&lt;BR /&gt;done &amp;gt; tparam_file&lt;BR /&gt;&lt;BR /&gt;Output:&lt;BR /&gt;[PD_ODS.s_m_FHOPEHS_TO_ODS_OTHERS_ALL_22]&lt;BR /&gt;[PD_ODS.s_m_FHOPEHS_TO_ODS_OTHERS_ALL_2]&lt;BR /&gt;[PD_ODS.s_m_FHOPEHS_TO_ODS_OTHERS_ALL_11]&lt;BR /&gt;[PD_ODS.s_m_FHOPEHS_TO_ODS_OTHERS_ALL_AA]&lt;BR /&gt;[PD_ODS.s_m_FHOPEHS_TO_ODS_OTHERS_ALL_A]&lt;BR /&gt;[PD_ODS.s_m_FHOPEHS_TO_ODS_OTHERS_ALL_A1]&lt;BR /&gt;&lt;BR /&gt;----below is the reading value ------&lt;BR /&gt;[PD_ODS.s_m_FHOPEHS_TO_ODS_OTHERS_ALL_22]&lt;BR /&gt;[PD_ODS.s_m_FHOPEHS_TO_ODS_OTHERS_ALL_2]&lt;BR /&gt;1&lt;BR /&gt;[PD_ODS.s_m_FHOPEHS_TO_ODS_OTHERS_ALL_AA]&lt;BR /&gt;[PD_ODS.s_m_FHOPEHS_TO_ODS_OTHERS_ALL_A]&lt;BR /&gt;1&lt;BR /&gt;&lt;BR /&gt;We found out that there is a file name "1" in the same directory as the script.&lt;BR /&gt;&lt;BR /&gt;Any idea how to over come this?&lt;BR /&gt;&lt;BR /&gt;thanks</description>
      <pubDate>Tue, 25 Jan 2005 04:33:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem-in-reading-parm-file/m-p/4881979#M400685</guid>
      <dc:creator>Chun Boon Lee</dc:creator>
      <dc:date>2005-01-25T04:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: script problem in reading parm file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem-in-reading-parm-file/m-p/4881980#M400686</link>
      <description>Hi,&lt;BR /&gt;can first check that the filenames are ok with: &lt;BR /&gt;ls -b PD_ODS.s_m_FHOPEHS_TO_ODS_OTHERS_ALL_*&lt;BR /&gt;This should eliminate any filename corruption.&lt;BR /&gt;Secondly why do you have a "&amp;gt; tparam_file"&lt;BR /&gt;at the end of your loop?&lt;BR /&gt;Regards</description>
      <pubDate>Tue, 25 Jan 2005 04:47:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem-in-reading-parm-file/m-p/4881980#M400686</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2005-01-25T04:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: script problem in reading parm file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem-in-reading-parm-file/m-p/4881981#M400687</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;try to use while loop instead of for&lt;BR /&gt;&lt;BR /&gt;syntax:&lt;BR /&gt;cat $param_file2 | while read&lt;BR /&gt;do&lt;BR /&gt;  i=$REPLY&lt;BR /&gt;  echo $i&lt;BR /&gt;  echo $i &amp;gt;&amp;gt; a.log&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Jan 2005 04:47:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem-in-reading-parm-file/m-p/4881981#M400687</guid>
      <dc:creator>Slawomir Gora</dc:creator>
      <dc:date>2005-01-25T04:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: script problem in reading parm file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem-in-reading-parm-file/m-p/4881982#M400688</link>
      <description>If I remove the file 1, the output is ok. If I touch a file A, then the the output become:&lt;BR /&gt;PD_ODS.s_m_FHOPEHS_TO_ODS_OTHERS_ALL_22]&lt;BR /&gt;[PD_ODS.s_m_FHOPEHS_TO_ODS_OTHERS_ALL_2]&lt;BR /&gt;1&lt;BR /&gt;A&lt;BR /&gt;A&lt;BR /&gt;1&lt;BR /&gt;&lt;BR /&gt;somehow there cannot have a file with a letter or number same as the end of output in the same directory as the script.&lt;BR /&gt;&lt;BR /&gt;This script is a portion of the application script.&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Jan 2005 04:58:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem-in-reading-parm-file/m-p/4881982#M400688</guid>
      <dc:creator>Chun Boon Lee</dc:creator>
      <dc:date>2005-01-25T04:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: script problem in reading parm file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem-in-reading-parm-file/m-p/4881983#M400689</link>
      <description>What is in test_ini ?</description>
      <pubDate>Tue, 25 Jan 2005 05:00:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem-in-reading-parm-file/m-p/4881983#M400689</guid>
      <dc:creator>Stephen Keane</dc:creator>
      <dc:date>2005-01-25T05:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: script problem in reading parm file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem-in-reading-parm-file/m-p/4881984#M400690</link>
      <description>test.ini content&lt;BR /&gt;&lt;BR /&gt;param_file2="p.txt"&lt;BR /&gt;param_file_bak2="p.bak"&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Jan 2005 05:11:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem-in-reading-parm-file/m-p/4881984#M400690</guid>
      <dc:creator>Chun Boon Lee</dc:creator>
      <dc:date>2005-01-25T05:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: script problem in reading parm file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem-in-reading-parm-file/m-p/4881985#M400691</link>
      <description>Hi,&lt;BR /&gt;I would assume that the problem is that the shell performs file name substitution in the current directory. The cure is to qoute the regular expressions in the script.&lt;BR /&gt;You say that it is a portion of the script;  typical places to look for culprits are square brackets, e.g. [a-z] and asterisks.&lt;BR /&gt;Try double qouting.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Tue, 25 Jan 2005 05:21:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem-in-reading-parm-file/m-p/4881985#M400691</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2005-01-25T05:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: script problem in reading parm file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem-in-reading-parm-file/m-p/4881986#M400692</link>
      <description>Change your script to ...&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;. test.ini&lt;BR /&gt;cp $param_file2 $param_file_bak2&lt;BR /&gt;&lt;BR /&gt;cat $param_file2 &amp;gt; a.log&lt;BR /&gt;echo "----below is the reading value ------" &amp;gt;&amp;gt; a.log&lt;BR /&gt;set -f&lt;BR /&gt;for i in `cat $param_file2`&lt;BR /&gt;do&lt;BR /&gt;echo $i&lt;BR /&gt;echo $i &amp;gt;&amp;gt; a.log&lt;BR /&gt;done &amp;gt; tparam_file&lt;BR /&gt;set +f&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Jan 2005 05:29:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem-in-reading-parm-file/m-p/4881986#M400692</guid>
      <dc:creator>Stephen Keane</dc:creator>
      <dc:date>2005-01-25T05:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: script problem in reading parm file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem-in-reading-parm-file/m-p/4881987#M400693</link>
      <description>Thanks very much, I had solved the problem using the set -f and set +f</description>
      <pubDate>Tue, 25 Jan 2005 05:35:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem-in-reading-parm-file/m-p/4881987#M400693</guid>
      <dc:creator>Chun Boon Lee</dc:creator>
      <dc:date>2005-01-25T05:35:58Z</dc:date>
    </item>
  </channel>
</rss>

