<?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: Simple script question... in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-question/m-p/5016909#M427697</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;the assignment to the variable does NOT change the formatting! It is the way you do your output.&lt;BR /&gt;Formatting preserved:&lt;BR /&gt;print "$mylog"&lt;BR /&gt;&lt;BR /&gt;Formatting ignored:&lt;BR /&gt;print $mylog&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
    <pubDate>Tue, 05 Dec 2006 05:17:23 GMT</pubDate>
    <dc:creator>Peter Nikitka</dc:creator>
    <dc:date>2006-12-05T05:17:23Z</dc:date>
    <item>
      <title>Simple script question...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-question/m-p/5016904#M427692</link>
      <description>I assign my variable via...&lt;BR /&gt;mylog=`hpvmstatus -P scottk_1 | grep scsi`&lt;BR /&gt;&lt;BR /&gt;A typical output from "hpvmstatus -P scottk_1 | grep scsi" gives me the following...&lt;BR /&gt;disk    scsi         0   0   0   0   0 disk      /dev/rdsk/c6t10d0&lt;BR /&gt;dvd     scsi         0   0   0   1   0 file      /tmp/Win2003Server_Itanium-withSP1-AX2EIVOL_EN.iso&lt;BR /&gt;disk    scsi         0   0   0   2   0 disk      /dev/rdsk/c6t10d1&lt;BR /&gt;&lt;BR /&gt;Why does it look like this...&lt;BR /&gt;disk scsi 0 0 0 0 0 disk /dev/rdsk/c6t10d0 dvd scsi 0 0 0 1 0 file /tmp/Win2003Server_Itanium-withSP1-AX2EIVOL_EN.iso disk scsi 0 0 0 2&lt;BR /&gt; 0 disk /dev/rdsk/c6t10d1&lt;BR /&gt;when I assign the output to a variable?&lt;BR /&gt;&lt;BR /&gt;I want to keep the formatting and append it after I make a change to the VM's configuration of the disks.&lt;BR /&gt;&lt;BR /&gt;How do I do that?</description>
      <pubDate>Tue, 05 Dec 2006 02:14:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-question/m-p/5016904#M427692</guid>
      <dc:creator>Gene Laoyan</dc:creator>
      <dc:date>2006-12-05T02:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: Simple script question...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-question/m-p/5016905#M427693</link>
      <description>If you want to keep the formatting, you must put it in a file.  You might be able to use sed to change a newline to some other character then change it back just before you print it.</description>
      <pubDate>Tue, 05 Dec 2006 02:24:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-question/m-p/5016905#M427693</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2006-12-05T02:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Simple script question...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-question/m-p/5016906#M427694</link>
      <description>Damn....&lt;BR /&gt;I was afraid you'd say that......lol&lt;BR /&gt;I guess I'll log to a file instead of build the log into a variable then write it to a text file.&lt;BR /&gt;&lt;BR /&gt;Thanks for your help.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Dec 2006 02:38:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-question/m-p/5016906#M427694</guid>
      <dc:creator>Gene Laoyan</dc:creator>
      <dc:date>2006-12-05T02:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Simple script question...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-question/m-p/5016907#M427695</link>
      <description>Hi Gene&lt;BR /&gt;&lt;BR /&gt;Try setting IFS to newline before e.g. echoing it:&lt;BR /&gt;# mylog=`hpvmstatus -P scottk_1 | grep scsi`&lt;BR /&gt;# IFS=\&lt;BR /&gt;+&lt;BR /&gt;# echo $mylog&lt;BR /&gt;&lt;BR /&gt;rgds&lt;BR /&gt;HGH&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Dec 2006 02:40:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-question/m-p/5016907#M427695</guid>
      <dc:creator>Hemmetter</dc:creator>
      <dc:date>2006-12-05T02:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: Simple script question...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-question/m-p/5016908#M427696</link>
      <description>Hmm, I can't duplicate your problem.  The variable in my case has the embedded newlines and everything seems to work fine.</description>
      <pubDate>Tue, 05 Dec 2006 02:46:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-question/m-p/5016908#M427696</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2006-12-05T02:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Simple script question...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-question/m-p/5016909#M427697</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;the assignment to the variable does NOT change the formatting! It is the way you do your output.&lt;BR /&gt;Formatting preserved:&lt;BR /&gt;print "$mylog"&lt;BR /&gt;&lt;BR /&gt;Formatting ignored:&lt;BR /&gt;print $mylog&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Tue, 05 Dec 2006 05:17:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-question/m-p/5016909#M427697</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-12-05T05:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Simple script question...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-question/m-p/5016910#M427698</link>
      <description>Peter you're a genius!&lt;BR /&gt;Points awarded.&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 05 Dec 2006 11:31:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-question/m-p/5016910#M427698</guid>
      <dc:creator>Gene Laoyan</dc:creator>
      <dc:date>2006-12-05T11:31:21Z</dc:date>
    </item>
  </channel>
</rss>

