Re: [SLUG] Scripting Advice needed

From: R P Herrold (herrold@owlriver.com)
Date: Thu Oct 17 2002 - 21:46:22 EDT


On Thu, 17 Oct 2002, Jim Wildman wrote:

> anyone use Perl one liners to do work. I've seen lots of one liners
> that are shell based.

I like this one. I tossed a variant into the k12 list the
other day to find the most burdened partition, for splitting
spindles

bash-2.05b$ iostat -x | awk {'print \
        $6"\t"$1"\t"$2"\t"$3"\t"$4"\t"$5'} | grep ^[0-9] | sort -n
0.01 /dev/hda10 0.01 0.00 0.00 0.00
0.01 /dev/hda2 0.01 0.00 0.00 0.00
0.03 /dev/hda11 0.01 0.00 0.00 0.00
0.13 /dev/hda8 0.06 0.99 0.01 0.04
0.89 /dev/hda1 0.43 0.00 0.02 0.00
1.68 /dev/hda3 0.00 1.47 0.21 0.11
1.93 /dev/hda9 0.45 1.11 0.08 0.27
18.75 /dev/hda5 8.22 0.55 1.16 0.30
34.81 /dev/hda7 16.27 1.26 1.14 0.40
319.06 /dev/hda6 27.81 1.80 12.53 0.63
377.33 /dev/hda 53.27 7.18 15.14 1.76
bash-2.05b$ df | grep hda6
/dev/hda6 2522048 2168020 225912 91% /usr
bash-2.05b$



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 16:23:23 EDT