<?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 Script for BDF in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-bdf/m-p/3069987#M904883</link>
    <description>Hey Budies,&lt;BR /&gt;&lt;BR /&gt;Could someone help me regardind cut comand utilization?&lt;BR /&gt;&lt;BR /&gt;I'm making a script and I need to cut the 5th and 6th colums of bdf output(%used and Mounted on).&lt;BR /&gt;&lt;BR /&gt;Thanks, &lt;BR /&gt;&lt;BR /&gt;Leandro!</description>
    <pubDate>Fri, 12 Sep 2003 14:39:08 GMT</pubDate>
    <dc:creator>Leandro Lucena.</dc:creator>
    <dc:date>2003-09-12T14:39:08Z</dc:date>
    <item>
      <title>Script for BDF</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-bdf/m-p/3069987#M904883</link>
      <description>Hey Budies,&lt;BR /&gt;&lt;BR /&gt;Could someone help me regardind cut comand utilization?&lt;BR /&gt;&lt;BR /&gt;I'm making a script and I need to cut the 5th and 6th colums of bdf output(%used and Mounted on).&lt;BR /&gt;&lt;BR /&gt;Thanks, &lt;BR /&gt;&lt;BR /&gt;Leandro!</description>
      <pubDate>Fri, 12 Sep 2003 14:39:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-bdf/m-p/3069987#M904883</guid>
      <dc:creator>Leandro Lucena.</dc:creator>
      <dc:date>2003-09-12T14:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Script for BDF</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-bdf/m-p/3069988#M904884</link>
      <description>Why cut when you can awk?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Fri, 12 Sep 2003 14:43:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-bdf/m-p/3069988#M904884</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2003-09-12T14:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Script for BDF</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-bdf/m-p/3069989#M904885</link>
      <description>Hi Leandro,&lt;BR /&gt;&lt;BR /&gt;awk would be a better tool here - try&lt;BR /&gt;&lt;BR /&gt;bdf | awk '{print $5,$6}'&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Jeff</description>
      <pubDate>Fri, 12 Sep 2003 14:46:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-bdf/m-p/3069989#M904885</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2003-09-12T14:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: Script for BDF</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-bdf/m-p/3069990#M904886</link>
      <description>Try this:&lt;BR /&gt;&lt;BR /&gt;# bdf | awk '{print $5, $6}' &amp;gt; /tmp/bdf_list</description>
      <pubDate>Fri, 12 Sep 2003 14:50:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-bdf/m-p/3069990#M904886</guid>
      <dc:creator>Helen French</dc:creator>
      <dc:date>2003-09-12T14:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: Script for BDF</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-bdf/m-p/3069991#M904887</link>
      <description>Not sure cut is your best best here.&lt;BR /&gt;&lt;BR /&gt;awk is a possibility as in &lt;BR /&gt;df | awk '$1 ~ "/dev" { printf "%s %s\n",$4,$5}'&lt;BR /&gt;&lt;BR /&gt;However bdf will split long lines and NFS mounts will break the above.&lt;BR /&gt;&lt;BR /&gt;Here is a perl snippet that deals with all that&lt;BR /&gt;&lt;BR /&gt;        @FILESYSTEMS=(`df 2&amp;gt;/dev/null`);&lt;BR /&gt;                        &lt;BR /&gt;        while($filesystem=pop @FILESYSTEMS){&lt;BR /&gt;                chop($filesystem);&lt;BR /&gt;&lt;BR /&gt;                # Dump df output we don't want&lt;BR /&gt;                        &lt;BR /&gt;                next if $filesystem =~ /.*Filesystem.*/;&lt;BR /&gt;                next if $filesystem =~ /swap.*/;&lt;BR /&gt;                next if $filesystem =~ /proc.*/;&lt;BR /&gt;                        &lt;BR /&gt;                # get filesystem percentage used (5th field)&lt;BR /&gt;&lt;BR /&gt;                ($waste1,$waste2,$waste3,$waste4,$percentage,$fs)=split " ", $filesystem;&lt;BR /&gt;                        &lt;BR /&gt;         if($fs eq ""){ # A two line df filesystem&lt;BR /&gt;                      $fs=$percentage;&lt;BR /&gt;                      $percentage=$waste4;&lt;BR /&gt;                      $filesystem=pop @FILESYSTEMS;&lt;BR /&gt;                }&lt;BR /&gt;                &lt;BR /&gt;                next if $filesystem =~ /:/; # Lose NFS filesystems&lt;BR /&gt;                        &lt;BR /&gt; print "Filestem $fs is $percentage used\";&lt;BR /&gt;}</description>
      <pubDate>Fri, 12 Sep 2003 14:50:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-bdf/m-p/3069991#M904887</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-09-12T14:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Script for BDF</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-bdf/m-p/3069992#M904888</link>
      <description>Leandro --&lt;BR /&gt;&lt;BR /&gt;My filename is called "useme"&lt;BR /&gt;&lt;BR /&gt;cut -d" " -f5,6 useme&lt;BR /&gt;&lt;BR /&gt;#cat useme&lt;BR /&gt;The fast brown fox chased after the lazy hare&lt;BR /&gt;#cut -d" " -f5,6 useme&lt;BR /&gt;chased after&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;The -d determines the delimter for cut to use.&lt;BR /&gt;Default is &lt;TAB&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Kent M. Ostby&lt;BR /&gt;&lt;BR /&gt;&lt;/TAB&gt;</description>
      <pubDate>Fri, 12 Sep 2003 15:03:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-bdf/m-p/3069992#M904888</guid>
      <dc:creator>Kent Ostby</dc:creator>
      <dc:date>2003-09-12T15:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Script for BDF</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-for-bdf/m-p/3069993#M904889</link>
      <description>Leandro,&lt;BR /&gt;&lt;BR /&gt;Try this script ...&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;#&lt;BR /&gt;# Author   : $Author: b077892 $&lt;BR /&gt;# Revision : $Revision: 1.1 $&lt;BR /&gt;# Date     : $Date: 2001/05/29 16:18:25 $&lt;BR /&gt;#&lt;BR /&gt;# Header   : @(#)$Header: bdf.sh $&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;bdf | awk '&lt;BR /&gt;BEGIN {&lt;BR /&gt;   iLinha=0&lt;BR /&gt;}&lt;BR /&gt;{&lt;BR /&gt;   if ( NF == 1 ) {&lt;BR /&gt;      lin = substr( $1, 1, length( $1 ) )&lt;BR /&gt;   } else {&lt;BR /&gt;      iLinha++&lt;BR /&gt;      if ( NF &amp;gt; 5 ) {&lt;BR /&gt;         Linha[iLinha]=sprintf("%-30.30s %8s %8s %8s %8s %3s %s",$1,$2,$3,$4,$5,$6,$7 )&lt;BR /&gt;      } else {&lt;BR /&gt;         Linha[iLinha]=sprintf("%-30.30s %8s %8s %8s %8s %3s %s",lin,$1,$2,$3,$4,$5,$6 )&lt;BR /&gt;      }&lt;BR /&gt;      lin=""&lt;BR /&gt;   }&lt;BR /&gt;}&lt;BR /&gt;END {&lt;BR /&gt;   i=1&lt;BR /&gt;   while ( i &amp;lt;= iLinha ) {&lt;BR /&gt;      print Linha[i]&lt;BR /&gt;      i++&lt;BR /&gt;   }&lt;BR /&gt;}&lt;BR /&gt;'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You my select the fields that you need.&lt;BR /&gt;&lt;BR /&gt;Best Regards.&lt;BR /&gt;&lt;BR /&gt;Romildo</description>
      <pubDate>Mon, 15 Sep 2003 11:36:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-for-bdf/m-p/3069993#M904889</guid>
      <dc:creator>Romildo</dc:creator>
      <dc:date>2003-09-15T11:36:13Z</dc:date>
    </item>
  </channel>
</rss>

