不可预料的文件末尾。。。。。
发表于 : 2007-12-21 18:10
在下现在老遇到这句话,在终端能完成的命令在shell的最后就碰到这个,看起来是退出的不对
#!/bin/bash
#在文件名中去掉括号
echo "enter work dir"
read WORK_DIR
if [ "PWD" ne "$WORK_DIR" ]
then
cd $WORK_DIR
rename 's/[((]//g;s/[))]//g' *
exit 0
运行的时候就说什么“不可预料的文件末尾”,在其他shell中也有磁到,谁帮我解释下
#!/bin/bash
#在文件名中去掉括号
echo "enter work dir"
read WORK_DIR
if [ "PWD" ne "$WORK_DIR" ]
then
cd $WORK_DIR
rename 's/[((]//g;s/[))]//g' *
exit 0
运行的时候就说什么“不可预料的文件末尾”,在其他shell中也有磁到,谁帮我解释下