Shell scripts are simple text files with commands to execute. The scripts are running by shell. All Bourne Shell scripts should begin with the sequence:
#!/bin/sh
If you want to run a script you should give it suitable rights (command chmod).
If you want to assign a number or string of characters to the variable use symbol “=”.
variable=3
zmienna=”ala has cat”
If you want to assign a string of characters to the variable put quotation marks around the string.
variable=`date`
Each value on the command line is assigned to the special variables $1, $2, $3. $0 is the name of the script. $# is a count of values on the command line.
number1 -gt number2 - number1 greates then number2
number1 -ge number2 - number1 greatest then or equal number2
number1 -eq number2 - number1 equal number2
number1 -le number2 - number1 little then or equal number2
number1 -lt number2 - number1 little then number2br />
Check or it is a file or a directory
-f filename – if filename is file
-d directoryname –if directoryname is directory
-e filename –if filename exist