![]() |
|
|
grep unix.com with google
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Our Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
Would it know to bdf certain files? Code:
find / -name filename 2>/dev/null
while read line
do
bdf $line
done
awk '{print$1}' | sort -n | grep -v used | awk '{sum += $1} END { print sum;}'
Last edited by pludi; 12-01-2009 at 02:01 AM.. |
|
|||
|
Im sorry if Ive confused you...
Objective: 1. Calculate the sum of total space, used space for all matching 'filesystems' 2. Display "Total Space = xx " ; "Used Space = yy"; "Free space = zz" This is the script I have wrote for it: [code1] find / -name 'filesystem' 2>/dev/null while read line do bdf $line done awk '{print$1}' | sort -n | grep -v used | awk '{sum += $1} END { print sum;}' The find command works fine, but the while do command hangs? So I dont know if the awk print line works? Bigben |
|
|||
|
EDIT: woops didn't see there was page2
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|