Under *nix they are ussually called scripts, they can been write in most shells
The most common shells used for shell scripts are sh, csh, bash, ksh.  There is
also a scripting/programing launage for *nix called perl that is very powerful.

Most of the shells man pages will give you the basic overview of the sytnax
man csh.  Also you man wish to check out your local barnes and nobles or 
amazon.com for books related to the shells.  O'Reilly produces really good
books on this subject.

For information on perl is avaible at perl.org.  This is a very powerful launge,
O'Reilly also has some really good books on these, I would recommend the lama
book, (Learning perl) and then the camel book (Programming with perl).

To create a simple shell script you could type the following in a file called
hello.csh

#!/bin/csh
echo "Hello World"

Line one denotes which interpeter the script should use (in this case c shell)
line 2 executes the echo command which will display a string to stdout (your
terminal)

After you have type this in (can us vi,joe,pico or other text editor)
you need to set the permission so you can execute it, this is done by
chmod 755 hello.csh, the run the program ./hello.csh

For perl the script would look like this (put it in a file called hello.pl)

#!/usr/bin/perl -w
print ("Hello World\n");

This script does the same thing, but in perl.  The first line tell it where
the perl interputer is located.  Sometimes this will be in differant places on
differant system, to find out where perl is, use the command
which perl
and put what it print out to the first line of the script and remeber to
put the she-bang (#!) in front of it.

chmod 755 hello.pl
./hello.pl
 
 


> 
> How do I make a "Linux batch" file. I'd like to put some commands in it
> like in dos(autoexec.bat), and how do you make them executable? Thank you-
> 
> Louis
> Louis J. Dupree Jr.  W4NRG 
> 3015 Englewood Dr.
> Kinston, NC 28504
> [EMAIL PROTECTED]
> 
> http://wwp.icq.com/187690 
> 

Reply via email to