summaryrefslogtreecommitdiff
path: root/.local/bin/space
blob: a8eaa31d57c2de20a724be849a24baf831167e63 (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_or_directory> [<file_or_directory> ...]"
    exit 1
fi

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