- Dec
- 48
- 1
I have an interesting puzzle to solve.
We use "Git for Windows" and "Git Extensions" for our source code control.
Those install MinGW64 and Cygwin so that they have a very Linux-like environment available to them.
I want to write some hooks and additional utilities, but I don't want to write them as Bash scripts --- not when I have TCC and Take Command available!
Enter the "Shebang!" line...
For those who are not Linux or Unix jockeys, Bash follows the convention that -- as long as the file is marked executable -- if you have a script that it doesn't directly know how to execute, it looks at the first line of the script. If the first two characters are "#" and "!" it takes the following characters as a path specification to an executable, and passes the pathname of the script to that executable for processing.
(Since programmers have long pronounced the name of exclamation point as "BANG!", years back someone thought it would be cute to pronounce the octothorpe (#) character as "She." Thus, "#! /bin/tch" on the first line of a script is read aloud as "Shebang! Bin Slash T C H.")
Problem is, that convention assumes all scripting languages use "#" as the beginning of a line comment.
Obviously, TCC does not!
Does anyone have a cool syntax trick in TCC / Take Command so that you can have the first line of the .BTM as a shebang-path, and yet not encounter errors once TCC starts processing the file?
We use "Git for Windows" and "Git Extensions" for our source code control.
Those install MinGW64 and Cygwin so that they have a very Linux-like environment available to them.
I want to write some hooks and additional utilities, but I don't want to write them as Bash scripts --- not when I have TCC and Take Command available!
Enter the "Shebang!" line...
For those who are not Linux or Unix jockeys, Bash follows the convention that -- as long as the file is marked executable -- if you have a script that it doesn't directly know how to execute, it looks at the first line of the script. If the first two characters are "#" and "!" it takes the following characters as a path specification to an executable, and passes the pathname of the script to that executable for processing.
(Since programmers have long pronounced the name of exclamation point as "BANG!", years back someone thought it would be cute to pronounce the octothorpe (#) character as "She." Thus, "#! /bin/tch" on the first line of a script is read aloud as "Shebang! Bin Slash T C H.")
Problem is, that convention assumes all scripting languages use "#" as the beginning of a line comment.
Obviously, TCC does not!
Does anyone have a cool syntax trick in TCC / Take Command so that you can have the first line of the .BTM as a shebang-path, and yet not encounter errors once TCC starts processing the file?