I am using Redhat Enterprise 5.3, and I have a small script that reads the directory name and compares it against a variable. Something seems to be causing it to think I am trying to get it to run the directory name as a command, and it also does not correctly evaluate the directory name against the string...(the directory name is "ll_bkup"):
SCRIPT:
#!/bin/bash # Changes backup folder to standard name after LogLogic System Stores a session number in t$ #TCJ 6/1/09 declare RESULT cd /home/storegrid/scripts/test/backup RESULT=$('ls') TEST="ll_bkup" if ["${RESULT}" = "${TEST}"]; then echo "it's ll_bkup" else echo $RESULT fi exit 0 RESULT:
[root@NB-BACKUP-01 backup]# sh /home/storegrid/scripts/test/nb-script-changellbackup.sh /home/storegrid/scripts/test/nb-script-changellbackup.sh: line 10: [ll_bkup: command not found ll_bkup