<?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 Another scripting problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/another-scripting-problem/m-p/4261754#M333071</link>
    <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;Somebody must have done this in the past. I have a problem whereby when I do a bdf the lvol and the filesystem are on different lines. I want to run a command for example that simply uses awk to put each lvol and relevant filesystem into a file. Thing is if I grep the lvol I lose the filesystem and vica versa. I thought about reading the output of bdf in line by line but still not sure how that would work.&lt;BR /&gt;&lt;BR /&gt;Cheers</description>
    <pubDate>Tue, 02 Sep 2008 12:20:47 GMT</pubDate>
    <dc:creator>Adam Noble</dc:creator>
    <dc:date>2008-09-02T12:20:47Z</dc:date>
    <item>
      <title>Another scripting problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-scripting-problem/m-p/4261754#M333071</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;Somebody must have done this in the past. I have a problem whereby when I do a bdf the lvol and the filesystem are on different lines. I want to run a command for example that simply uses awk to put each lvol and relevant filesystem into a file. Thing is if I grep the lvol I lose the filesystem and vica versa. I thought about reading the output of bdf in line by line but still not sure how that would work.&lt;BR /&gt;&lt;BR /&gt;Cheers</description>
      <pubDate>Tue, 02 Sep 2008 12:20:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-scripting-problem/m-p/4261754#M333071</guid>
      <dc:creator>Adam Noble</dc:creator>
      <dc:date>2008-09-02T12:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Another scripting problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-scripting-problem/m-p/4261755#M333072</link>
      <description>Hi Adam:&lt;BR /&gt;&lt;BR /&gt;Bill Hassell has an elegant script that accomodates your problem while making the standard 'bdf' much handier!&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1124262" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1124262&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 02 Sep 2008 12:25:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-scripting-problem/m-p/4261755#M333072</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-09-02T12:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Another scripting problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-scripting-problem/m-p/4261756#M333073</link>
      <description>Yes, other folks have done this before :-)&lt;BR /&gt;Both stumbling into the line split, as well at taking the next step to tie the data up with lvm.&lt;BR /&gt;&lt;BR /&gt;First step is to see wether 'df' instead of 'bdf' works for you.&lt;BR /&gt;&lt;BR /&gt;Some prior posts with pointers to solutions:&lt;BR /&gt;(google: +awk +bdf +split +site:itrc.hp.com)&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=440647" target="_blank"&gt;http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=440647&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1218175" target="_blank"&gt;http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1218175&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Sep 2008 12:36:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-scripting-problem/m-p/4261756#M333073</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2008-09-02T12:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Another scripting problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-scripting-problem/m-p/4261757#M333074</link>
      <description>The simple answer is to use read to process each line from bdf and test if the 2nd value (total Kbytes) is null. If true, read again to pickup the rest of the values, something like this:&lt;BR /&gt; &lt;BR /&gt;bdf | while read FS TOT USED AVAIL PERCENT MNT&lt;BR /&gt;do&lt;BR /&gt;[ "TOT" = "" ] &amp;amp;&amp;amp; read TOT USED AVAIL PERCENT MNT&lt;BR /&gt; &lt;BR /&gt;echo "$FS $TOT $USED $AVAIL $PERCENT $MNT"&lt;BR /&gt; &lt;BR /&gt;done&lt;BR /&gt; &lt;BR /&gt;The test for "TOT" triggers another read for line 2 to pickup the rest of the values. The echo line is just to show the one line results.&lt;BR /&gt; &lt;BR /&gt;</description>
      <pubDate>Wed, 03 Sep 2008 13:43:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-scripting-problem/m-p/4261757#M333074</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2008-09-03T13:43:07Z</dc:date>
    </item>
  </channel>
</rss>

