Skip to content

Instantly share code, notes, and snippets.

@bsolomon1124
Last active March 31, 2020 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsolomon1124/c23a848f58ffcbbe59889aefe9654c3d to your computer and use it in GitHub Desktop.
Save bsolomon1124/c23a848f58ffcbbe59889aefe9654c3d to your computer and use it in GitHub Desktop.
Recursive-find shell scripts, including no-extensions with shebang
#!/bin/sh
{
grep -rlE '^#!\s?/(usr/)?bin/(env\s+)?(sh|bash|fish|zsh)' .
find . -type f \( -iname "*.bash" -o -iname "*.sh" -o -iname "*.zsh" -o -iname "*.fish" \)
} | tr "\n" " " | uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment