- 论坛徽章:
- 0
|
如下代码运行时报错,高手帮忙看看撒:
bash-3.00$ more test.sh
#!/bin/bash
. /store/abrun_text/qa_test/GMI_Events_Test/itf_frame.sh
# Step3, clean some folders
if [ -f /store/abrun_text/hslocal/ab_work_dir/RTSearch/*/* ]
then
echo "`date '+%m/%d/%y %H:%M:%S,'` fail to clean the abinitio working folder, so quit the testing"
rm /store/abrun_text/hslocal/ab_work_dir/RTSearch/*/*
if [ #? -ne 0 ]
then
echo "`date '+%m/%d/%y %H:%M:%S,'` fail to clean the abinitio working folder, so quit the testing"
exit 1
fi
fi
bash-3.00$ ./test.sh
./test.sh: line 6: [: too many arguments
bash-3.00$ sh +x test.sh
10/25/12 03:08:04, fail to clean the abinitio working folder, so quit the testing
rm: /store/abrun_text/hslocal/ab_work_dir/RTSearch/filings/test1 is a directory
rm: /store/abrun_text/hslocal/ab_work_dir/RTSearch/filings/test2 is a directory
test.sh: test: ] missing
bash-3.00$ |
|