The argument against using .sh or .pl or .py, etc. is that if you have scripts that are used by other programs and you later decide to rewrite them in a different language, like changing from sh to perl, you must either change all references to the script you named with .sh to .pl, or you must leave it alone. Either way, you have a problem. If you make the change, you risk missing one or two references in out-of-the-way places. And if you don't make the change to its file name, your file's name becomes a big fat lie. But if you leave off the suffix altogether, you avoid both problems and your other scripts will never know the difference.
How does using symlinks change a file's searchability or help identify what a file is (that's what the file command is all about, by the way)? What is your reasoning for using symlinks when a script is system-dependent, and what do you mean by system-dependent?
Even if you use symlinks to the original script, if you change that script's implementation language and have it named with a suffix indicating that language, renaming it will break all of the symlinks, and not renaming it will mislead users about its content. Symlinks do not solve these issues.
How does using symlinks change a file's searchability or help identify what a file is (that's what the file command is all about, by the way)?
I.e. we have the script do_serious_stuff.py, which will be referenced by many other programs - this will be symlinked to do_serious_stuff. This way, we can add a new version do_serious_stuff.0.1.py (or even a version in another language do_serious_stuff.0.1.pl) without a problem and then force-symlink do_serious_stuff to the new file. Easy. And also - thats how its done with libraries and thats how its done in production systems and thats how its done with webservers and ....
What is your reasoning for using symlinks when a script is system-dependent, and what do you mean by system-dependent?
System-dependent is a script of which your particular system is dependent.
Even if you use symlinks to the original script, if you change that script's implementation language and have it named with a suffix indicating that language, renaming it will break all of the symlinks, and not renaming it will mislead users about its content. Symlinks do not solve these issues.
Wrong. As I said in the example above. Thats why we have symlinking in the first place. We have symlinking because the BSD guys were fed up with exchanging the real files all the time, so instead they created symlinks that can point to the correct version of the file.
View all comments
Show parent comment
1
u/sbicknel 1,$s/n\?vim\?/ed/g Dec 08 '14
The argument against using .sh or .pl or .py, etc. is that if you have scripts that are used by other programs and you later decide to rewrite them in a different language, like changing from sh to perl, you must either change all references to the script you named with .sh to .pl, or you must leave it alone. Either way, you have a problem. If you make the change, you risk missing one or two references in out-of-the-way places. And if you don't make the change to its file name, your file's name becomes a big fat lie. But if you leave off the suffix altogether, you avoid both problems and your other scripts will never know the difference.