preload
Jul 19
#!/bin/bash
 
# Author : Antony
# Date   : 19/07/2008
# Description : Script for copying files recursively form one directory to another
 
# Get Source and Destination Directory Paths
echo "Enter the source path"
read src
echo  "Enter the Destination path"
read dest
 
for file in `find $src -name "*.*"`
do
echo $file
echo `cp $file $dest`
done
Oct 08
#!/bin/bash
# Author : A.Antony
# Date : 08/10/2007
 
echo "Enter First Value(a) : "
read a
echo "Enter Second Value (b): "
read b
echo "Before swap, a = $a and y = $b"
c=$a
a=$b
b=$c
echo "After swap, a = $a and b = $b"
Oct 05

Three options are used for arithmatic manipulations
1) expr
2) bc
3) (( ))

Example

#Program for Arithmetic Operations
#!/bin/bash
#Author : Antony
#Date : 05/10/2007
 
echo "Enter the first Number "
read x
echo "Enter the second Number "
read y
#Method 1
add=<span style="font-weight: bold; font-style: italic;">$(( $x + $y ))</span>
echo "The Addition is $add"
 
#Method 2
sub=<span style="font-weight: bold; font-style: italic;">`expr $x - $y`</span>
echo "The Subtraction is $sub"
 
#Method 3
div=<span style="font-weight: bold; font-style: italic;">`echo "scale=4; $x / $y" | bc`</span>
echo "The Divison is $div"

Output of this program

VIT:/home/antony# sh arith.sh
Enter the first Number
123
Enter the second Number
124
The Addition is 247
The Subtraction is -1
The Divison is .9919
VIT:/home/antony#