stupid shell tricks again

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Craig White
Date:  
To: plug-discuss
Subject: stupid shell tricks again
I've got the bash book in front of me and I've been searching the web
and I'm thinking that this takes more than a 'cut' command.

I'm trying to evaluate disk usage by users - much like a quota system.

du -s /path/to/some/directory/* > output
cut -f1 output; echo " - "; cut -f2 output

looks like
4136
8956
-
/home/filesystems/samba/profiles/username
/home/filesystems/samba/profiles/username2

which I can't really script at all.

I want to compare the -f1 value and output to a file for purposes of
sending an email - is there someone who has done this already? Do I need
to use awk or perl?

Craig


---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss