Redhat 5.3 Enterprise
The following Shell script is used to check and see if a backup directry is named "ll_backup", then changes it to equal the content of a file RESULT.VAR. The result.var file is copied for log purposes to another directory. I had this working in a test enviorenment but in production it throughs a weird error that I can't for the life of me figure out!
#!/bin/bash #!/bin/cat # Restores original directory name for next LogLogic Update #TCJ 6/1/09 declare RESULT declare FILE FILE=result.var cd /home/nb-backup/backups/nb-st3000/ll_bkup_126.96.36.199/ if [ -d ll_bkup ] then cat result.var | while IFS=: read RESULT mv "ll_bkup" "$RESULT" mv result.var /home/storegrid/scripts/results/result-`date +%y%m%d%s`.var else exit 0 fi exit 0
nb-script-restorellbackup.sh: line 14: syntax error near unexpected token
else' nb-script-restorellbackup.sh: line 14:else'