syntax error near unexpected token `else'
Hi i think this is a stupip question too. But I hope than any one can help me to solve it .
./rootb.txt: line 12: syntax error near unexpected token `else
./rootb.txt: line 12: `else
#! /bin/bash
mkdir /backup_sistem/sistem
A="`date | cut -d" " -f3`"
if [ "$A" == " " ] ;
than
date | cut -d" " -f1,2,4,7 > /backup_sistem/.data
B="`cut -c1,2,3,5,6,7,9,11,12,13,14 /backup_sistem/.data`"
cp -rf /home/* /backup_sistem/sistem/
cd /backup_sistem/
tar -cvf "`echo $B.tar`" /backup_sistem/sistem/* &> /dev/null
else
date | cut -d" " -f1,2,3,6 > /backup_sistem/.data
B="`cut -c1,2,3,5,6,7,9,10,12,13,14,15 /backup_sistem/.data`"
cp -rf /home/* /backup_sistem/sistem/
cd /backup_sistem/
tar -cvf "`echo $B.tar`" /backup_sistem/sistem/* &> /dev/null
fi
rm -rf /backup_sistem/sistem
exit
best regards
jose
|