<?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 general scripting question in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/general-scripting-question/m-p/5062444#M94341</link>
    <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;when I run a for statement and the line contains more than one field ...&lt;BR /&gt;&lt;BR /&gt;can this line be displayed as 2 fields within a variable&lt;BR /&gt;&lt;BR /&gt;ie&lt;BR /&gt;&lt;BR /&gt;for aa in `ls -l`&lt;BR /&gt;do&lt;BR /&gt;echo $aa &lt;BR /&gt;done &lt;BR /&gt;&lt;BR /&gt;root&lt;BR /&gt;system&lt;BR /&gt;705381&lt;BR /&gt;09&lt;BR /&gt;Aug&lt;BR /&gt;13:41&lt;BR /&gt;sortaudit4ge.aug09&lt;BR /&gt;-rw-r--r--&lt;BR /&gt;1&lt;BR /&gt;root&lt;BR /&gt;system&lt;BR /&gt;33280129&lt;BR /&gt;09&lt;BR /&gt;Aug&lt;BR /&gt;13:41&lt;BR /&gt;&lt;BR /&gt;this is just and example btw.&lt;BR /&gt;&lt;BR /&gt;Thanks &lt;BR /&gt;&lt;BR /&gt;Chris.</description>
    <pubDate>Thu, 09 Aug 2007 07:46:18 GMT</pubDate>
    <dc:creator>lawrenzo_1</dc:creator>
    <dc:date>2007-08-09T07:46:18Z</dc:date>
    <item>
      <title>general scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/general-scripting-question/m-p/5062444#M94341</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;when I run a for statement and the line contains more than one field ...&lt;BR /&gt;&lt;BR /&gt;can this line be displayed as 2 fields within a variable&lt;BR /&gt;&lt;BR /&gt;ie&lt;BR /&gt;&lt;BR /&gt;for aa in `ls -l`&lt;BR /&gt;do&lt;BR /&gt;echo $aa &lt;BR /&gt;done &lt;BR /&gt;&lt;BR /&gt;root&lt;BR /&gt;system&lt;BR /&gt;705381&lt;BR /&gt;09&lt;BR /&gt;Aug&lt;BR /&gt;13:41&lt;BR /&gt;sortaudit4ge.aug09&lt;BR /&gt;-rw-r--r--&lt;BR /&gt;1&lt;BR /&gt;root&lt;BR /&gt;system&lt;BR /&gt;33280129&lt;BR /&gt;09&lt;BR /&gt;Aug&lt;BR /&gt;13:41&lt;BR /&gt;&lt;BR /&gt;this is just and example btw.&lt;BR /&gt;&lt;BR /&gt;Thanks &lt;BR /&gt;&lt;BR /&gt;Chris.</description>
      <pubDate>Thu, 09 Aug 2007 07:46:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/general-scripting-question/m-p/5062444#M94341</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2007-08-09T07:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: general scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/general-scripting-question/m-p/5062445#M94342</link>
      <description>can u please paste the desired output.</description>
      <pubDate>Thu, 09 Aug 2007 07:54:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/general-scripting-question/m-p/5062445#M94342</guid>
      <dc:creator>AwadheshPandey</dc:creator>
      <dc:date>2007-08-09T07:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: general scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/general-scripting-question/m-p/5062446#M94343</link>
      <description>You would have to set the value of the IFS variable to some character that doesn't appear in the input stream i.e.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;IFS="|"&lt;BR /&gt;&lt;BR /&gt;for aa in `ls -l`&lt;BR /&gt;do&lt;BR /&gt;  echo $aa&lt;BR /&gt;done</description>
      <pubDate>Thu, 09 Aug 2007 07:54:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/general-scripting-question/m-p/5062446#M94343</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-08-09T07:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: general scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/general-scripting-question/m-p/5062447#M94344</link>
      <description>check this:&lt;BR /&gt;&lt;A href="http://www.softpanorama.org/Scripting/Shellorama/Reference/IFS.shtml" target="_blank"&gt;http://www.softpanorama.org/Scripting/Shellorama/Reference/IFS.shtml&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Aug 2007 08:01:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/general-scripting-question/m-p/5062447#M94344</guid>
      <dc:creator>Oviwan</dc:creator>
      <dc:date>2007-08-09T08:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: general scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/general-scripting-question/m-p/5062448#M94345</link>
      <description>just what I was looking for.&lt;BR /&gt;&lt;BR /&gt;Thanks for responses and solution.&lt;BR /&gt;&lt;BR /&gt;Chris.</description>
      <pubDate>Thu, 09 Aug 2007 08:05:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/general-scripting-question/m-p/5062448#M94345</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2007-08-09T08:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: general scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/general-scripting-question/m-p/5062449#M94346</link>
      <description>Hi Chris:&lt;BR /&gt;&lt;BR /&gt;When you munge the shell IFS in a script, it's good practice to do something like this:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;OLDIFS=${IFS}&lt;BR /&gt;IFS="|"&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;IFS=${OLDIFS}&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;BTW: the "root system" ownership looks like AIX :-))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Aug 2007 08:07:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/general-scripting-question/m-p/5062449#M94346</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-08-09T08:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: general scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/general-scripting-question/m-p/5062450#M94347</link>
      <description>&amp;gt;when I run a for statement and the line contains more than one field ... can this line be displayed as 2 fields within a variable&lt;BR /&gt;&lt;BR /&gt;You can of course use while read instead of "for i in $(); do":&lt;BR /&gt;ll | while read a b c; do&lt;BR /&gt;&lt;BR /&gt;The delimited tokens are put in "a", "b" and the rest in "c".&lt;BR /&gt;&lt;BR /&gt;You can of course pipe the output to awk and use its -F to separate tokens.</description>
      <pubDate>Thu, 09 Aug 2007 21:30:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/general-scripting-question/m-p/5062450#M94347</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-08-09T21:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: general scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/general-scripting-question/m-p/5062451#M94348</link>
      <description>Thanks again all.&lt;BR /&gt;&lt;BR /&gt;Yes from the output it is AIX, I havent worked on a HP machine for 18 months now however moving jobs to a company that has 20 + HP servers ;=}</description>
      <pubDate>Fri, 10 Aug 2007 03:11:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/general-scripting-question/m-p/5062451#M94348</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2007-08-10T03:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: general scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/general-scripting-question/m-p/5062452#M94349</link>
      <description>.</description>
      <pubDate>Fri, 10 Aug 2007 03:11:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/general-scripting-question/m-p/5062452#M94349</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2007-08-10T03:11:20Z</dc:date>
    </item>
  </channel>
</rss>

