test.sh 文件如下:
#!/bin/csh
....
sed -i "s/10.10.10.10/10.0.66.107/g" test.conf
....
test.conf 文件如下:
....
10.10.10.10
.....
当执行./test.sh时候,报错如下:
sed: 1: "test.conf": undefined label 'est.conf'
>>>>>解决方案:
sed -i ‘’ "s/10.10.10.10/10.0.66.107/g" test.conf
这样就可以正常执行sed命令
========================================================================
csh取输从终端输入的字符串
#!/bin/csh
echo "input yes or no"
set yesorno=$<
if( "$yesorno" != "yes")then
echo $yesorno
exit 0
endif
echo ">>>>>>>>>>>>>>"
阅读(4958) | 评论(0) | 转发(0) |