+ Reducing script word count
This commit is contained in:
parent
1bed6fc964
commit
1d2c406697
2 changed files with 4 additions and 3 deletions
|
@ -2,7 +2,8 @@
|
|||
|
||||
capacity=$(df -h --output=source,avail /home | grep -A1 '/' | sed "s/^.* //;s/[[:alpha:]]//")
|
||||
warn=""
|
||||
if [ $capacity -lt 71 ]; then warn='!'; fi
|
||||
|
||||
[ $capacity -lt 21 ] && warn='!'
|
||||
|
||||
printf "%s%s" "$warn " "$(echo $capacity | sed "s/$/G free/")"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue