summaryrefslogtreecommitdiff
path: root/.local/bin/space
blob: d0703063b90e40952aba928a4bc19c27a6562271 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

# Check if at least one argument is passed
if [ "$#" -eq 0 ]; then
echo "Usage: $0 <file(s)_or_dir> [<file(S)_or_dir> ...]"
    exit 1
fi

# Loop through all the arguments and perform 'du -sh' on each
for item in "$@"; do
    du -sh "$item"
done | sort -h