Correct potential errors

This commit is contained in:
Sofia
2026-01-07 17:25:44 +08:00
committed by GitHub
parent 45b12fc70b
commit 5306c8d3da

View File

@@ -13,7 +13,7 @@ echo "***********************************************"
# Check available capacity
dir_avail() {
df -h >/dev/null 2>&1 && h="$2"
df -P $h "${1:-.}" 2>/dev/null | awk 'NR==2 {print $(NF-2)}'
df -P $h "${1:-.}" 2>/dev/null | awk 'NR==2 {print $4}'
}
ckcmd() { #检查命令