Bullshit. If there is a suffix or not doesn't matter for the environment, it only matters for you if you need to find every *zsh or *bash-script on your system or in a specific folder.
If you're working with multiple shells you'll need that. If you only use one it doesn't matter.
What if you have bash and python scripts? If you want to search and list only your python-pieces you'd need to go into every file and grep the first line to see if it uses #!/usr/bin/env python or #!/usr/bin/env bash. So, instead of find -type f \*py you'll need to use grep (slooow) or silver searcher/ack (and even these will be slower since you need to access the file every time - not only the filename).
Especially not .sh when the script isn't even an sh script.
find <path_where_scripts_live> -type f -exec file {} \;
I have never had to find a script, simply because it was a python, bash, perl, or other script. The language doesn't matter. On the other hand, I do often look for bits of code, so I just grep for the pattern I'm looking for, in my directory of scripts.
5
u/geirha Dec 02 '14
Don't put extensions on scripts. Especially not
.shwhen the script isn't even an sh script.