Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
04-03-2005, 07:14 PM
|
#1
|
|
Member
Registered: Jun 2004
Location: Montreal
Distribution: Red Hat 8
Posts: 120
Rep:
|
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
|
|
|
|
04-03-2005, 07:28 PM
|
#2
|
|
Senior Member
Registered: Sep 2003
Location: Egypt
Distribution: Arch
Posts: 1,528
Rep:
|
it didn't run ?
did it make any errors ?
sorry but your question is a little bit vague
|
|
|
|
04-05-2005, 01:56 PM
|
#3
|
|
Member
Registered: Jun 2004
Location: Montreal
Distribution: Red Hat 8
Posts: 120
Original Poster
Rep:
|
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
|
|
|
|
04-05-2005, 02:20 PM
|
#4
|
|
Member
Registered: Jul 2004
Location: Santiago, Chile
Distribution: Ubuntu
Posts: 410
Rep:
|
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.
|
|
|
|
04-06-2005, 01:12 PM
|
#5
|
|
Member
Registered: Jun 2004
Location: Montreal
Distribution: Red Hat 8
Posts: 120
Original Poster
Rep:
|
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
|
|
|
|
04-06-2005, 03:22 PM
|
#6
|
|
Member
Registered: Dec 2004
Location: Oregon, USA
Distribution: Kubuntu 9.04
Posts: 181
Rep:
|
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/
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:14 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|