diff options
author | filip <“filip.rabiega@gmail.com”> | 2025-07-10 12:24:33 +0200 |
---|---|---|
committer | filip <“filip.rabiega@gmail.com”> | 2025-07-10 12:24:33 +0200 |
commit | e4ea00cfc9fc7340c62dd920b4754787c4499de6 (patch) | |
tree | 2e4c036888529e99cd67a0ee59d9ac8bb5e09000 /printpath | |
parent | 1feb678fc3d52a7a3c4e31bb153783852fa08a58 (diff) | |
download | chadscripts-e4ea00cfc9fc7340c62dd920b4754787c4499de6.tar.gz chadscripts-e4ea00cfc9fc7340c62dd920b4754787c4499de6.tar.bz2 chadscripts-e4ea00cfc9fc7340c62dd920b4754787c4499de6.zip |
Diffstat (limited to 'printpath')
-rwxr-xr-x | printpath | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/printpath b/printpath new file mode 100755 index 0000000..55a3212 --- /dev/null +++ b/printpath @@ -0,0 +1,10 @@ +#!/bin/sh + +# This script is slow, but it works +IFS=: +for dir in $PATH; do + [ -d "$dir" ] || continue + for file in "$dir"/* "$dir"/.*; do + [ -f "$file" ] && [ -x "$file" ] && basename "$file" + done +done | sort -u |