当前位置: 技术问答>linux和unix
unix shell小问题
来源: 互联网 发布时间:2016-12-16
本文导语: #!/bin/csh set dired = "" set valumed = "" echo "Please input the dir" read dired echo "please input the valumed" read valumed find ${dired} | grep ${valumed} >> comin.txt 在find这里一直报缺少参数,若是直接给一个目录则可以执行,求...
#!/bin/csh
set dired = ""
set valumed = ""
echo "Please input the dir"
read dired
echo "please input the valumed"
read valumed
find ${dired} | grep ${valumed} >> comin.txt
在find这里一直报缺少参数,若是直接给一个目录则可以执行,求原因及改的方法??
set dired = ""
set valumed = ""
echo "Please input the dir"
read dired
echo "please input the valumed"
read valumed
find ${dired} | grep ${valumed} >> comin.txt
在find这里一直报缺少参数,若是直接给一个目录则可以执行,求原因及改的方法??
|
修改如下
#!/bin/csh
set dired=""
set valumed=""
echo "Please input the dir"
set dired=$
comin.txt