<?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: output of a variable in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/output-of-a-variable/m-p/5112505#M91702</link>
    <description>for data in `echo $COLORS`^Jdo^Jecho $COLORS^Jdone&lt;BR /&gt;&lt;BR /&gt;should be&lt;BR /&gt;&lt;BR /&gt;for data in `echo $COLORS`^Jdo^Jecho $data^Jdone&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
    <pubDate>Thu, 05 Jun 2008 11:24:18 GMT</pubDate>
    <dc:creator>Pete Randall</dc:creator>
    <dc:date>2008-06-05T11:24:18Z</dc:date>
    <item>
      <title>output of a variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/output-of-a-variable/m-p/5112504#M91701</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;I am having difficutly reading a variable in a while / for loop.  I'm not sure whether it's because I have forgot or something else:&lt;BR /&gt;&lt;BR /&gt;COLORS=#CC9999 #9999FF #FFCC88 #FF99FF #FFFF66 #FF9933 #CC9966 #990099"&lt;BR /&gt;&lt;BR /&gt; for data in `echo $COLORS`^Jdo^Jecho $COLORS^Jdone&lt;BR /&gt;#CC9999 #9999FF #FFCC88 #FF99FF #FFFF66 #FF9933 #CC9966 #990099&lt;BR /&gt;#CC9999 #9999FF #FFCC88 #FF99FF #FFFF66 #FF9933 #CC9966 #990099&lt;BR /&gt;#CC9999 #9999FF #FFCC88 #FF99FF #FFFF66 #FF9933 #CC9966 #990099&lt;BR /&gt;#CC9999 #9999FF #FFCC88 #FF99FF #FFFF66 #FF9933 #CC9966 #990099&lt;BR /&gt;#CC9999 #9999FF #FFCC88 #FF99FF #FFFF66 #FF9933 #CC9966 #990099&lt;BR /&gt;#CC9999 #9999FF #FFCC88 #FF99FF #FFFF66 #FF9933 #CC9966 #990099&lt;BR /&gt;#CC9999 #9999FF #FFCC88 #FF99FF #FFFF66 #FF9933 #CC9966 #990099&lt;BR /&gt;#CC9999 #9999FF #FFCC88 #FF99FF #FFFF66 #FF9933 #CC9966 #990099&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I dont want this - I want each $VAR to be printed on a seperate line.&lt;BR /&gt;&lt;BR /&gt;Am i being dumb?&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;&lt;BR /&gt;Chris.</description>
      <pubDate>Thu, 05 Jun 2008 11:20:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/output-of-a-variable/m-p/5112504#M91701</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2008-06-05T11:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: output of a variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/output-of-a-variable/m-p/5112505#M91702</link>
      <description>for data in `echo $COLORS`^Jdo^Jecho $COLORS^Jdone&lt;BR /&gt;&lt;BR /&gt;should be&lt;BR /&gt;&lt;BR /&gt;for data in `echo $COLORS`^Jdo^Jecho $data^Jdone&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 05 Jun 2008 11:24:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/output-of-a-variable/m-p/5112505#M91702</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2008-06-05T11:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: output of a variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/output-of-a-variable/m-p/5112506#M91703</link>
      <description>Hi CHris:&lt;BR /&gt;&lt;BR /&gt;COLORS="#CC9999 #9999FF #FFCC88 #FF99FF #FFFF66 #FF9933 #CC9966 #990099"&lt;BR /&gt;&lt;BR /&gt;for VAR in ${COLORS}&lt;BR /&gt;do&lt;BR /&gt;    echo ${VAR}&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 05 Jun 2008 11:26:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/output-of-a-variable/m-p/5112506#M91703</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-06-05T11:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: output of a variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/output-of-a-variable/m-p/5112507#M91704</link>
      <description>you know when you look at something for so long your mind turns to jelly and all you get is "wibble and wobble"&lt;BR /&gt;&lt;BR /&gt;Thats how I feel - a dumb question which I should have seen but thanks guys I think I will go home for the day!!&lt;BR /&gt;&lt;BR /&gt;Chris.</description>
      <pubDate>Thu, 05 Jun 2008 11:38:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/output-of-a-variable/m-p/5112507#M91704</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2008-06-05T11:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: output of a variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/output-of-a-variable/m-p/5112508#M91705</link>
      <description>[I know the topic just closed]&lt;BR /&gt;Before you go home, please consider what you are going to do with the individual words once you have them.&lt;BR /&gt;I find that all too often folks then fo into awk or perl or further process.&lt;BR /&gt;In that case, use such tool to do both the splitting and the next processing step(s).&lt;BR /&gt;&lt;BR /&gt;For sake of completeness here are two frames:&lt;BR /&gt;&lt;BR /&gt;awk:&lt;BR /&gt;&lt;BR /&gt;# echo $COLORS | awk '{while (i&lt;NF&gt;&lt;/NF&gt;&lt;BR /&gt;Perl:&lt;BR /&gt;&lt;BR /&gt;# $ echo $COLORS | perl -lne 'print foreach (split)'&lt;BR /&gt;&lt;BR /&gt;# $ export COLORS&lt;BR /&gt;$  perl -le 'foreach (split /\s+/, $ENV{COLORS}) { print }'&lt;BR /&gt;&lt;BR /&gt;# echo $COLORS | perl -pe '$_ = join "\n",split'&lt;BR /&gt;&lt;BR /&gt;adding that last newline....&lt;BR /&gt;&lt;BR /&gt; echo $COLORS | perl -pe '$_ = (join "\n",split) . "\n"'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Jun 2008 11:50:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/output-of-a-variable/m-p/5112508#M91705</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2008-06-05T11:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: output of a variable</title>
      <link>https://community.hpe.com/t5/operating-system-linux/output-of-a-variable/m-p/5112509#M91706</link>
      <description>thank you</description>
      <pubDate>Fri, 06 Jun 2008 08:35:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/output-of-a-variable/m-p/5112509#M91706</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2008-06-06T08:35:58Z</dc:date>
    </item>
  </channel>
</rss>

