Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Awk > Re: matching co...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 10 of 26 Topic 2199 of 2236
Post > Topic >>

Re: matching column variables from two awks!

by spacegoose <spacegoose@[EMAIL PROTECTED] > Mar 21, 2008 at 03:03 PM

On Mar 21, 5:16 pm, Ed Morton <mor...@[EMAIL PROTECTED]
> wrote:
> On 3/21/2008 3:51 PM, spacegoose wrote:
> <snip>
>
> > here a snip of df:
> > /local/ds/xp30(/dev/md/ds/dsk/x30):133896070 blocks 22413779 files
> > /local/ds/xp6 (/dev/md/ds/dsk/x6):121164266 blocks 22385181 files
> > /local/ds/xp4 (/dev/md/ds/dsk/x4):129245812 blocks 22194814 files
> > /local/ds/xp34(/dev/md/ds/dsk/x34):114122034 blocks 22075764 files
> > /local/ds/xp22(/dev/md/ds/dsk/x22):109638490 blocks 22290938 files
> > /local/ds/xp8 (/dev/md/ds/dsk/x8):132204190 blocks 22382085 files
>
> Hmm, that doesn't look like what I get with "df -h". Oh well. So,
sometimes
> there's a space before the first "(":
>
>         /local/ds/xp6 (/dev/md/...
>
> and sometimes there isn't:
>
>         /local/ds/xp30(/dev/md
yes.
>
> Right?
>
> <snip>
>
> > myFile sample is here:
> > 611   65114 2008/03/20 15:31 xp0            256000 user/xxx/INBOX
> > 134   4805 2008/03/20 13:41 xp1             256000 user/yyy/INBOX
> > 398   13403 2008/03/19 14:05 xp10            256000 user/zzz/INBOX
> > 367   31508 2008/03/20 15:19 xp11            256000 user/aaa/INBOX
> > 45    1759 2006/02/18 11:05 xp12             256000 user/bbb/INBOX
>
> So, the 5th field (xp0, xp1, etc.) is the key to match to the end of the
first
> field in the df output (/local/ds/xp6, etc.). i.e. I just need to
prepend
> "/local/ds/" to the 5th field of myFile to get the first field of the df
output.
> Right?
yes.
>
> > desired out:
> > File System                          bytes  capacity  accounts
> > -------------------------------------------------------------------
> > /                                19G        53%       2150
> > /local/ds/xp0                    200G       71%       2250
> > /local/ds/xp1                    200G       66%       2167
> > /local/ds/xp10                   200G       66%       3400
> > /local/ds/xp11                   200G       68%       4444
> > /local/ds/xp12                   200G       67%       5000
>
> How are you getting those bytes and capacity numbers from the df output
you posted?

i'm getting those fields with: df -h | grep dsk | sort +5

>
> PLEASE post the input that could actually produce the desired output if
you'd
> like help.
>
>         Ed.

thanks for your help - i will try to make this clearer soon.




 26 Posts in Topic:
matching column variables from two awks!
spacegoose <spacegoose  2008-03-20 21:36:28 
Re: matching column variables from two awks!
Ed Morton <morton@[EMA  2008-03-21 00:04:37 
Re: matching column variables from two awks!
spacegoose <spacegoose  2008-03-21 07:15:57 
Re: matching column variables from two awks!
Ed Morton <morton@[EMA  2008-03-21 09:40:47 
Re: matching column variables from two awks!
spacegoose <spacegoose  2008-03-21 09:33:56 
Re: matching column variables from two awks!
Ed Morton <morton@[EMA  2008-03-21 14:59:28 
Re: matching column variables from two awks!
spacegoose <spacegoose  2008-03-21 13:51:43 
Re: matching column variables from two awks!
Ed Morton <morton@[EMA  2008-03-21 16:16:40 
Re: matching column variables from two awks!
spacegoose <spacegoose  2008-03-21 14:00:13 
Re: matching column variables from two awks!
spacegoose <spacegoose  2008-03-21 15:03:17 
Re: matching column variables from two awks!
spacegoose <spacegoose  2008-03-21 16:09:17 
Re: matching column variables from two awks!
Ed Morton <morton@[EMA  2008-03-21 18:32:47 
Re: matching column variables from two awks!
spacegoose <spacegoose  2008-03-21 22:00:21 
Re: matching column variables from two awks!
Ed Morton <morton@[EMA  2008-03-22 07:37:33 
Re: matching column variables from two awks!
spacegoose <spacegoose  2008-03-22 07:37:12 
Re: matching column variables from two awks!
Ed Morton <morton@[EMA  2008-03-22 18:16:25 
Re: matching column variables from two awks!
gazelle@[EMAIL PROTECTED]  2008-03-22 23:23:43 
Re: matching column variables from two awks!
Ed Morton <morton@[EMA  2008-03-22 19:44:09 
Re: matching column variables from two awks!
spacegoose <spacegoose  2008-03-22 22:13:30 
Re: matching column variables from two awks!
Ed Morton <morton@[EMA  2008-03-23 00:41:29 
Re: matching column variables from two awks!
"Rajan" <svr  2008-03-23 17:04:58 
Re: matching column variables from two awks!
Ed Morton <morton@[EMA  2008-03-23 16:50:45 
Re: matching column variables from two awks!
gazelle@[EMAIL PROTECTED]  2008-03-23 22:19:40 
Re: matching column variables from two awks!
"Rajan" <svr  2008-03-23 20:58:50 
Re: matching column variables from two awks!
spacegoose <spacegoose  2008-03-24 08:55:09 
Re: matching column variables from two awks!
Ed Morton <morton@[EMA  2008-03-26 08:13:54 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri May 16 6:41:10 CDT 2008.