low-diskspace.sh 202 B

123456789
  1. #!/usr/bin/env bash
  2. set -euo pipefail # bash strict mode
  3. df | awk -v mountpoint="$1" -v percentage="$2" '$6 ~ "^"mountpoint"$"{if($5 >= percentage){print "FUCK"}}'
  4. # while :; do
  5. # sleep 1h
  6. # done