summaryrefslogtreecommitdiff
path: root/printpath
blob: a76f8f9b68b7155a02987a278a1c7b9b7ebdff98 (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