Raffaele BELARDI wrote:
Yes, they are called bash scripts.

Create a text file with your favorite editor, containing the bash commands you want to execute, save it as <whatever name.whatever ext>, then from the console type:

chmod u+x <whatever name.whatever ext>

to make the script executable. To execute it, type from a console (in the directory containing the script):

./<whatever name.whatever ext>

bash provides you with lots of control commands (if, while, for...) provided you digest its anachronistic and counter-intuitive the syntax...

raffaele

I like to put all my shell scripts in a directory called bin off my home directory. That way, you can type the command from anywhere, and it will run. (/home/<username>/bin is in you path with the defaul setup in 9.2, and probably 10.0) If you want to see some examples of scripts, look at the entries in /etc/cron.daily, or about 1/3rd of the "programs" in /bin, /usr/bin, /sbin, /use/sbin, ect.

There are also a couple of HOWTOs on writing script files, as well as many books. You are not limmited to writing them in one launge. The first line of the script tells what program to use to run the script.

#!/bin/bash

Mikkel
--

  Do not meddle in the affairs of dragons,
for you are crunchy and taste good with Ketchup!


____________________________________________________
Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________

Reply via email to