On Mon, 2004-03-22 at 12:30, Jeremy C. Reed wrote:
> On Mon, 22 Mar 2004, Craig White wrote:
>
> > 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?
>
----
I suppose...
#!/bin/sh
wdirect=/root/scripts
chdirect=/home/filesystems/samba/profiles
size_plateau=1024000
du -s $chdirect/* > $wdirect/users-homes
cut -f1 $wdirect/users-homes; echo " - "; \
cut -f2 $wdirect/users-homes
outputs
4136
8956
-
/home/filesystems/samba/profiles/test
/home/filesystems/samba/profiles/testuser
Not that I am really wanting to print this to screen but that is where I
am starting. I want it to put
directory_size = cut -f1 $wdirect/users-homes/$i
and then
if $size_plateau > $directory_size then 'mail' an alert
This obviously is a pseudo code. My problem is that the 'cut' command
seems to want to operate on the entire file and not a line by line.
Craig
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss