First time writing a Linux Script !!!!
Hello,
I want to write a Linux script that will automatically recompile my source code files and rename the compiled files to lower case. For this, I have written a small script file called gen_Katz.csh and through the chmod command made the sript file executable. I used Linux mv commands to rename the compiled files and some special Oracle Linux commands to compile my source file. 1) Beyond this is there anything else that I should include in my Linux script file to make sure that it will run properly ? Paolo |
it didn't run ?
did it make any errors ? sorry but your question is a little bit vague |
Question
Hello,
I did not try to run the script yet. However, looking at another Linux Script, I noticed that the first line in the script contains a line like #bin csh something.... 1) Is that of any importance ? PT |
It is of importance, and probably was something like: #!/bin/csh
That says which shell will run the script. For instance, I would put "#!/bin/bash" because I use bash. Anyway, maybe you should look at the "make" utility. This is what is usually used to compile. It works by creating a "Makefile" that contains the dependencies and the compilation commands to solve them.. It is better than a script, because it is able to check which sources have changed and compile only those ones. |
2 plateforms: Windows / Linux
Hello,
I my case the development environment is a WIndows XP Pro and the production environment is Linux Red Hat. I take the source files under windows through FTP on my Linux box to be recompiled. I am thinking of writing a Linux script that would take all the source files and recompile them automatically. Suggestions ? PT |
make
make is the standard linux tool for [semi]automatic compilation.
Shell scripting? A nice tutorial for bash shell scripting is here: http://www.tldp.org/LDP/abs/html/ |
All times are GMT -5. The time now is 11:46 PM. |