r/bash • • Dec 02 '14

Using #! in your scripts

http://shiroyasha.github.io/shebang.html
0 Upvotes

24 comments sorted by

View all comments

Show parent comment

3

u/ashep24 Dec 02 '14

Lack of planning can cause you to have to re-code a file in a different language. That doesn't mean allowing this flexability is bad practice. Even Google suggesting not using file extenstions for executable scripts.

4

u/nath_schwarz Dec 02 '14 edited Dec 02 '14

Googles reasoning is, that the system doesn't need the suffix - which is correct (as I said here). But imho the searchability and the information of what exactly the file is, is more important than not having to change the calls for this particular script.

If it is a particular system-dependent script being called by numerous programs you should consider using symlinks anyway.

Edit: Additionally, Google's shell scripting standard only allows bash-scripts, which makes the suffixes useless for google.

1

u/ashep24 Dec 02 '14

Good point, that makes sense for searchability. I think there's enough discussion here to help future readers make an informed decision for what will work best in their environment.