1 2 3 4 5 6 7 8 9 10 11 12 13
#!/bin/sh location=${1:-/} [ -d "$location" ] || exit case "$location" in "/home"* ) icon="🏠" ;; "/mnt"* ) icon="💾" ;; *) icon="🖥";; esac printf "%s%s" " $icon " "$(df -h "$location" | awk ' /[0-9]/ {print $3 "/" $2 " "} ')"