#!/bin/sh 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