16 lines
407 B
Bash
Executable file
16 lines
407 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [[ $1 = "" ]] || [[ $1 = $USER ]] ; then
|
|
/usr/bin/quota
|
|
else
|
|
/usr/bin/quota $*
|
|
fi | sed 's/home-adh/home/' | awk -F'(:| *)' '
|
|
BEGIN { fs = "" }
|
|
/Disk/ { print; print "utilisé\tquota\tlimite\t%\t(en Mo)" }
|
|
{
|
|
if (NF == 2) { fs = $2 }
|
|
else if (fs != "") {
|
|
printf "%3.2f\t%3.2f\t%3.2f\t%3.1f\t%s\n", $2/1024, $3/1024, $4/1024, $2*100/$3, fs
|
|
fs = ""
|
|
}
|
|
}'
|