<?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: Scripting help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/4397715#M665563</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;You need to use double quotes.  Consider:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;while read LINE&lt;BR /&gt;do&lt;BR /&gt;    echo "${LINE}"&lt;BR /&gt;    echo  ${LINE}&lt;BR /&gt;done &amp;lt; file&lt;BR /&gt;&lt;BR /&gt;...compare the output when you run this.&lt;BR /&gt;&lt;BR /&gt;Note that 'cat file|whle read...' adds a needless process.  Let the shell do the work as I show above.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
    <pubDate>Wed, 08 Apr 2009 13:11:34 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2009-04-08T13:11:34Z</dc:date>
    <item>
      <title>Scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/4397714#M665562</link>
      <description>Hi.  I have a file which contains data in specific positions, its a CISAM file. &lt;BR /&gt;When I cat the file normally for example, &lt;BR /&gt;&lt;BR /&gt;cat file | cut -c 265 returns &lt;BR /&gt;Y&lt;BR /&gt;Y&lt;BR /&gt;Y&lt;BR /&gt;N&lt;BR /&gt;&lt;BR /&gt;However, when I &lt;BR /&gt;cat file | while read line&lt;BR /&gt;&lt;BR /&gt;The "read line" section truncates the position of 265 and leaves only one space between the text fields.&lt;BR /&gt;&lt;BR /&gt;For example cat file | head -1 shows&lt;BR /&gt;AIMPORT    001199910251416U094CLE 199911241809Q823EYX IMPORT AUTO ALLOCATION&lt;BR /&gt;              GBP&lt;BR /&gt;                                  00000000018000&lt;BR /&gt;                        Y A&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But with the while read line , $line shows as &lt;BR /&gt;AIMPORT 001199910251416U094CLE 199911241809Q823EYX IMPORT AUTO ALLOCATION GBP 00&lt;BR /&gt;000000018000 Y A&lt;BR /&gt;&lt;BR /&gt;I am not too sure how to use $IFS.&lt;BR /&gt;How can I get "read" to not remove the spaces !!?&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Apr 2009 13:00:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/4397714#M665562</guid>
      <dc:creator>Paul Thomson_2</dc:creator>
      <dc:date>2009-04-08T13:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/4397715#M665563</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;You need to use double quotes.  Consider:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;while read LINE&lt;BR /&gt;do&lt;BR /&gt;    echo "${LINE}"&lt;BR /&gt;    echo  ${LINE}&lt;BR /&gt;done &amp;lt; file&lt;BR /&gt;&lt;BR /&gt;...compare the output when you run this.&lt;BR /&gt;&lt;BR /&gt;Note that 'cat file|whle read...' adds a needless process.  Let the shell do the work as I show above.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Apr 2009 13:11:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/4397715#M665563</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-04-08T13:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/4397716#M665564</link>
      <description>Thanks James, answered my question !! &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Apr 2009 13:38:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-help/m-p/4397716#M665564</guid>
      <dc:creator>Paul Thomson_2</dc:creator>
      <dc:date>2009-04-08T13:38:29Z</dc:date>
    </item>
  </channel>
</rss>

