Linux batch files
Anyone who is familiar with dos should be familiar with the old batch files.Simple programs created to execute a string of command line commands.My question is this, is there anyway I can create something like a dos batch file in linux?
If so what do I need to do it, and how do I do it. |
It is called a shell script
Just start it with #!/bin/sh (or whatever shell the commands are for) type all the commands below it And chmod +x the_filename. There... same exact thing. EDIT: Well not exactly the same thing... these are hundreds of times more powerful and you can program whole programs with them. But in their simplest form... they are exactly like batch files. |
Thank you very much.
Yeah, I know batch files can't do a lot but are quite handy.I'll have to look into these shell scripts. |
and something else I once searched myself silly for. Quite often you'll need to execute your script by typing ./scriptname
|
All times are GMT -5. The time now is 04:18 AM. |