Hi
I am working on a program that i should use sh type script, now i have bash script , so how can i change bash script to sh?
i would appreciate if someone could help me to convert,
the script is :
PHP Code:
#!/bin/bash
rOut=/var/spool/asterisk/outgoing/
rUser=asterisk
rGroup=asterisk
nFile=call.csv
rtry=5
mtry=3
stime=60
for nums in $(cat $nFile)
do
num=`echo $nums | awk -F"," {'print $1'}`
noise=`echo $nums | awk -F"," {'print $2'}`
nTrunk=`echo $nums | awk -F"," {'print $4'}`
echo "`date`,$num,$noise" >> call-log.csv
echo "Channel: DAHDI/g2/$num" >> $num.call
echo "RetryTime:$rtry" >> $num.call
echo "MaxRetries:$mtry" >> $num.call
echo "Context: campain" >> $num.call
echo "CallerID: $num" >> $num.call
echo "Extension: 300" >> $num.call
chown $rUser.$rGroup $num.call
mv $num.call $rOut
sleep $stime
done