Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Shell script broken, bdf adds new line for long filesystem name.

Re: Shell script broken, bdf adds new line for long filesystem name.

From: Kirtikumar Deshpande <kirtikumar_deshpande_at_yahoo.com>
Date: Tue, 07 Oct 2003 16:19:25 -0800
Message-ID: <F001.005D24D1.20031007161925@fatcity.com>


Hi Ethan,
Our SA gave me the following script... Put it in your /usr/local/bin and include the dir in PATH...

#!/bin/ksh
# -- bdfg

COUNT=0 bdfit () {
if [ -z "$SIZE" ] ; then

   LVOL2=$LVOL
   ((COUNT=1))
else
  if [ "$COUNT" -eq "1" ] ; then

      echo $LVOL2 $LVOL $SIZE $USED $FREE $PERCNT|awk '{ printf "%-33s %10s%10s%10s%6s %-26s\n",
$1, $2, $3, $4, $5, $6}'

      COUNT=0
      unset LVOL2
  else
      echo $LVOL $SIZE $USED $FREE $PERCNT $MOUNT|awk '{ printf "%-33s %10s%10s%10s%6s  %-26s\n", 

$1, $2, $3, $4, $5, $6}'

  fi
fi
}

if [ -z "$1" ] ; then
  /usr/bin/bdf|while read LVOL SIZE USED FREE PERCNT MOUNT ; do     bdfit
  done
else
  echo Filesystem kbytes used avail %used Mounted |awk '{ printf "%-33s %10s%10s%10s%6s %-26s\n",

$1, $2, $3, $4, $5, $6}'

  for FILESYS in $* ; do
    /usr/bin/bdf $FILESYS|grep -v Filesystem|while read LVOL SIZE USED FREE PERCNT MOUNT ; do       bdfit
    done
  done
fi
#


Do you Yahoo!?
The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Kirtikumar Deshpande
  INET: kirtikumar_deshpande_at_yahoo.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Oct 07 2003 - 19:19:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US