<?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: Getting File Content in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-file-content/m-p/3430857#M859596</link>
    <description>Thanks SRI</description>
    <pubDate>Fri, 26 Nov 2004 01:36:06 GMT</pubDate>
    <dc:creator>Pando</dc:creator>
    <dc:date>2004-11-26T01:36:06Z</dc:date>
    <item>
      <title>Getting File Content</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-file-content/m-p/3430853#M859592</link>
      <description>I have a file with the following contents..&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;DIFFLOTID,0001&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;I need to get the 0001 placed into a variable.&lt;BR /&gt;&lt;BR /&gt;Maximum points to correct replies!&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Nov 2004 01:05:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-file-content/m-p/3430853#M859592</guid>
      <dc:creator>Pando</dc:creator>
      <dc:date>2004-11-26T01:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Getting File Content</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-file-content/m-p/3430854#M859593</link>
      <description>Hi Fernando,&lt;BR /&gt;&lt;BR /&gt;If there are only two fields are seperated by comma, then you can use 'while'&lt;BR /&gt;&lt;BR /&gt;oIFS=$IFS&lt;BR /&gt;IFS=","&lt;BR /&gt;&lt;BR /&gt;while read first next&lt;BR /&gt;do&lt;BR /&gt;&lt;DO_SOMETHING_WITH_&gt;&lt;BR /&gt;done &amp;lt; your_file&lt;BR /&gt;IFS=$oIFS&lt;BR /&gt;&lt;BR /&gt;In the above, 'next' is your variable. The above won't work if there is are multiple commands in each line.&lt;BR /&gt;&lt;BR /&gt;-Sri&lt;/DO_SOMETHING_WITH_&gt;</description>
      <pubDate>Fri, 26 Nov 2004 01:09:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-file-content/m-p/3430854#M859593</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2004-11-26T01:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Getting File Content</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-file-content/m-p/3430855#M859594</link>
      <description>Im trying out to use the command below:&lt;BR /&gt;&lt;BR /&gt;VAR=$(grep "DIFFLOTID" $FILE |awk -F \" '{print $1}')&lt;BR /&gt;&lt;BR /&gt;but i get the whole string DIFFLOTID,0001&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Nov 2004 01:16:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-file-content/m-p/3430855#M859594</guid>
      <dc:creator>Pando</dc:creator>
      <dc:date>2004-11-26T01:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Getting File Content</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-file-content/m-p/3430856#M859595</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Use this&lt;BR /&gt;&lt;BR /&gt;VAR=$(awk -F "," '/DIFFLOTID/ {print $2}' your_file)&lt;BR /&gt;&lt;BR /&gt;If there are more than one line containing DIFFLOTID, then VAR will have more than one value.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Fri, 26 Nov 2004 01:25:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-file-content/m-p/3430856#M859595</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2004-11-26T01:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Getting File Content</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-file-content/m-p/3430857#M859596</link>
      <description>Thanks SRI</description>
      <pubDate>Fri, 26 Nov 2004 01:36:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-file-content/m-p/3430857#M859596</guid>
      <dc:creator>Pando</dc:creator>
      <dc:date>2004-11-26T01:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Getting File Content</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-file-content/m-p/3430858#M859597</link>
      <description>Hi SRI,&lt;BR /&gt;&lt;BR /&gt;Thanks for your reply. It was a great help to a neophyte like me. I would like to ask now how can i know if the $var contains pure strings of numbers or alphanumerics?&lt;BR /&gt;&lt;BR /&gt;Many thanks!</description>
      <pubDate>Fri, 26 Nov 2004 01:36:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-file-content/m-p/3430858#M859597</guid>
      <dc:creator>Pando</dc:creator>
      <dc:date>2004-11-26T01:36:57Z</dc:date>
    </item>
  </channel>
</rss>

