How To Find All of the Shell Scripts In a Directory Gregg May 21, 2023 This is a quick and dirty way which will list all of the files that are shell scripts: for i in * do type=$(file ${i}|awk -F, ‘{print $2}’) if [[ “${type}” = " ASCII text executable" ]]; then echo “${i} is a shell script” fi done Cli Motd Awk