I have a group of scripts written on Windows (which can not be modified) ! Allows relative paths in commands, we are trying to run these scripts on Unix, but Bash only has its #! Respect the full path in the instructions. I have looked around, but are not able to locate programs designed for an option or replacement in Bash, and interpreter names; Is it possible to override that functionality - possibly using a different shell?
Normally you specify the binary to execute the script, which causes # ! will be ignored, therefore, if you have a Python script which looks like:
#! .. \ bin \ python2.6 code will be here On Unix / Linux, you can say:
prompt $ python2.6 & lt ; Scriptfile & gt; And this command line will execute using binary. I see the hashbang line as one that asks the operating system to use the specified binary on the line, but you can override it by not executing the script as a normal executable.
In the worst case you can write some cover script which will explicitly ask the interpreter to execute the code in the script file for all platforms you will use.
Comments
Post a Comment