madasafish
Technical User
Given the output of "df -k"
I want to be able to read each LINE and assign a unique variable to each "space separated parameter"
If $5(%used) is > then 81(Fixed Variable) then I want to print the Variable $1 and the Variable $5 outside of awk/nawk/gawk.
Example
echo $1 is $5 full
Any help appreciated.
Madasafish2
Example output of df -k
df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 5842664 4566860 979004 83% /
/dev/hda1 101086 12354 83513 13% /boot
none 127808 0 127808 0% /dev/shm
I want to be able to read each LINE and assign a unique variable to each "space separated parameter"
If $5(%used) is > then 81(Fixed Variable) then I want to print the Variable $1 and the Variable $5 outside of awk/nawk/gawk.
Example
echo $1 is $5 full
Any help appreciated.
Madasafish2
Example output of df -k
df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 5842664 4566860 979004 83% /
/dev/hda1 101086 12354 83513 13% /boot
none 127808 0 127808 0% /dev/shm