<?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: Can someone explain this... in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184862#M163602</link>
    <description>The problem with lines 3 thru 8 is that the shell doesn't know exactly where the varialbe $IP ends and the rest starts.&lt;BR /&gt;&lt;BR /&gt;To get the behavior you expect use the form ${IP} and it will work much better.</description>
    <pubDate>Fri, 06 Feb 2004 15:10:13 GMT</pubDate>
    <dc:creator>Patrick Wallek</dc:creator>
    <dc:date>2004-02-06T15:10:13Z</dc:date>
    <item>
      <title>Can someone explain this...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184861#M163601</link>
      <description>Can some one explain this...&lt;BR /&gt;IPLIST=/the/correct/path/sw_ip.txt&lt;BR /&gt;for IP in $(cat $IPLIST)&lt;BR /&gt;do&lt;BR /&gt;        echo $IP&lt;BR /&gt;        echo $IP&lt;BR /&gt;        echo "$IP"&lt;BR /&gt;        echo $IP ","&lt;BR /&gt;        echo "$IP ,"&lt;BR /&gt;        echo "$IP, changed passwd."&lt;BR /&gt;        echo "$IP changed passwd."&lt;BR /&gt;        echo $IP", changed passwd."&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Output:&lt;BR /&gt;123.456.20.50&lt;BR /&gt;123.456.20.50&lt;BR /&gt;123.456.20.50&lt;BR /&gt; ,3.456.20.50&lt;BR /&gt; ,3.456.20.50&lt;BR /&gt;, changed passwd.&lt;BR /&gt; changed passwd.&lt;BR /&gt;, changed passwd.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Feb 2004 15:02:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184861#M163601</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2004-02-06T15:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone explain this...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184862#M163602</link>
      <description>The problem with lines 3 thru 8 is that the shell doesn't know exactly where the varialbe $IP ends and the rest starts.&lt;BR /&gt;&lt;BR /&gt;To get the behavior you expect use the form ${IP} and it will work much better.</description>
      <pubDate>Fri, 06 Feb 2004 15:10:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184862#M163602</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2004-02-06T15:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone explain this...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184863#M163603</link>
      <description>Tried that still no go...&lt;BR /&gt;for IP in $(cat $IPLIST)&lt;BR /&gt;do&lt;BR /&gt;        echo ${IP}&lt;BR /&gt;        echo ${IP}&lt;BR /&gt;        echo "${IP}"&lt;BR /&gt;        echo ${IP} ","&lt;BR /&gt;        echo "${IP} ,"&lt;BR /&gt;        echo "${IP}, changed passwd."&lt;BR /&gt;        echo "${IP} changed passwd."&lt;BR /&gt;        echo ${IP}", changed passwd."&lt;BR /&gt;done&lt;BR /&gt;123.456.20.50&lt;BR /&gt;123.456.20.50&lt;BR /&gt;123.456.20.50&lt;BR /&gt;,3.456.20.50&lt;BR /&gt;,3.456.20.50&lt;BR /&gt;, changed passwd.&lt;BR /&gt;changed passwd.&lt;BR /&gt;, changed passwd.</description>
      <pubDate>Fri, 06 Feb 2004 15:13:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184863#M163603</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2004-02-06T15:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone explain this...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184864#M163604</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I cut and pasted your shell script and I tried it on one of my 11i boxes.  It seems to work correctly:&lt;BR /&gt;&lt;BR /&gt;&amp;gt;./ip_test.sh                                    &lt;BR /&gt;123.456.20.50                                                                   &lt;BR /&gt;123.456.20.50                                                                   &lt;BR /&gt;123.456.20.50                                                                   &lt;BR /&gt;123.456.20.50 ,                                                                 &lt;BR /&gt;123.456.20.50 ,                                                                 &lt;BR /&gt;123.456.20.50, changed passwd.                                                  &lt;BR /&gt;123.456.20.50 changed passwd.                                                   &lt;BR /&gt;123.456.20.50, changed passwd.&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Feb 2004 15:14:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184864#M163604</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2004-02-06T15:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone explain this...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184865#M163605</link>
      <description>I tried this and it worked fine:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;IP=123.45.67.89&lt;BR /&gt;echo ${IP}&lt;BR /&gt;echo "${IP}"&lt;BR /&gt;echo ${IP} ","&lt;BR /&gt;echo "${IP} ,"&lt;BR /&gt;echo "${IP}, changed passwd."&lt;BR /&gt;echo "${IP} changed passwd"&lt;BR /&gt;echo ${IP}", changed passwd"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;OUTPUT:&lt;BR /&gt;123.45.67.89&lt;BR /&gt;123.45.67.89&lt;BR /&gt;123.45.67.89 ,&lt;BR /&gt;123.45.67.89 ,&lt;BR /&gt;123.45.67.89, changed passwd.&lt;BR /&gt;123.45.67.89 changed passwd&lt;BR /&gt;123.45.67.89, changed passwd&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Feb 2004 15:15:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184865#M163605</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2004-02-06T15:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone explain this...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184866#M163606</link>
      <description>I believe this is a follow-up messages to&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=426931" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=426931&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I have no idea why your shell is behaving like this. You should have gotten atleast from echo "$IP changed passwd." withouth using {} around the variable.&lt;BR /&gt;&lt;BR /&gt;Can you try it in another window?. Add #!/usr/bin/ksh to the starting of the script and see if it makes any difference.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;IPLIST=/the/correct/path/sw_ip.txt&lt;BR /&gt;for IP in $(cat $IPLIST)&lt;BR /&gt;do&lt;BR /&gt;echo $IP&lt;BR /&gt;echo $IP&lt;BR /&gt;echo "$IP"&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;-Sri&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Feb 2004 15:18:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184866#M163606</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2004-02-06T15:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone explain this...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184867#M163607</link>
      <description>Have you checked the file you are getting the IPs from?  I would check and make sure the data is what you think it is.&lt;BR /&gt;&lt;BR /&gt;I just tried the following with no problem:&lt;BR /&gt;&lt;BR /&gt;Script:&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;IPLIST=iplist&lt;BR /&gt;for IP in $(cat $IPLIST)&lt;BR /&gt;do&lt;BR /&gt;echo ${IP}&lt;BR /&gt;echo "${IP}"&lt;BR /&gt;echo ${IP} ","&lt;BR /&gt;echo "${IP} ,"&lt;BR /&gt;echo "${IP}, changed passwd."&lt;BR /&gt;echo "${IP} changed passwd"&lt;BR /&gt;echo ${IP}", changed passwd"&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;iplist file:&lt;BR /&gt;# cat iplist&lt;BR /&gt;12.34.56.78&lt;BR /&gt;90.12.34.56&lt;BR /&gt;&lt;BR /&gt;OUTPUT:&lt;BR /&gt;12.34.56.78&lt;BR /&gt;12.34.56.78&lt;BR /&gt;12.34.56.78 ,&lt;BR /&gt;12.34.56.78 ,&lt;BR /&gt;12.34.56.78, changed passwd.&lt;BR /&gt;12.34.56.78 changed passwd&lt;BR /&gt;12.34.56.78, changed passwd&lt;BR /&gt;90.12.34.56&lt;BR /&gt;90.12.34.56&lt;BR /&gt;90.12.34.56 ,&lt;BR /&gt;90.12.34.56 ,&lt;BR /&gt;90.12.34.56, changed passwd.&lt;BR /&gt;90.12.34.56 changed passwd&lt;BR /&gt;90.12.34.56, changed passwd&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Feb 2004 15:21:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184867#M163607</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2004-02-06T15:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone explain this...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184868#M163608</link>
      <description>FOUND MY PROBLEM!!!&lt;BR /&gt;&lt;BR /&gt;Had no idea that the file was created in notepad...&lt;BR /&gt;&lt;BR /&gt;Had to dos2ux!&lt;BR /&gt;Works fine now!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;THanks for all your help!&lt;BR /&gt;I know everyone has spent alot of time on it!</description>
      <pubDate>Fri, 06 Feb 2004 17:02:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184868#M163608</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2004-02-06T17:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone explain this...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184869#M163609</link>
      <description>I think IP is getting set to "123.456.20.50\r".&lt;BR /&gt; &lt;BR /&gt;The \r causes a carriage return thus over writing the first part of the data.&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Fri, 06 Feb 2004 17:32:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184869#M163609</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2004-02-06T17:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone explain this...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184870#M163610</link>
      <description>Notepad is like vi, it creates a plain ASCII file (unlike Wordpad or MS Word which has numerous binary codes). However, since Notepad runs on a PC, the file would either be transfered by ftp or through SAMBA/CIFS. In either case, the foreign operating system imposes it's own file layout, something that makes file sharing less than convenient. Although not as common, sharing files with Macs and mainframes would have the same issues. Two useful commands for inspecting shared files:&lt;BR /&gt; &lt;BR /&gt;cat -v some_file&lt;BR /&gt;xd -xc some_file</description>
      <pubDate>Fri, 06 Feb 2004 21:32:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-someone-explain-this/m-p/3184870#M163610</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2004-02-06T21:32:50Z</dc:date>
    </item>
  </channel>
</rss>

