summaryrefslogtreecommitdiff
path: root/printpath
blob: 396fd86e40f3331e9e3f40d8e9f10bdb00626ae6 (plain)
1
2
3
4
5
6
7
#!/bin/sh
# Print everythin in PATH

echo "$PATH" | tr ':' '\n' | while IFS= read -r dir; do
    [ -d "$dir" ] || continue
    find "$dir" -maxdepth 1 -type f -perm -111 -printf '%f\n'
done | sort -u