Chinaunix
标题:
跪求各位高手!!!!shell编程问题
[打印本页]
作者:
jiang358519521
时间:
2011-07-31 15:16
标题:
跪求各位高手!!!!shell编程问题
假设有一个文件,若存在,那就继续下面的程序。不存在就选择继续等待出现这样的文件。。直达这个文件出现。
作者:
lkk2003rty
时间:
2011-07-31 17:33
while [ ! -e "file" ]
do
;
done
复制代码
作者:
jiang358519521
时间:
2011-07-31 17:53
回复
2#
lkk2003rty
while [ ! -e "file"]
无法实现呢?
作者:
lkk2003rty
时间:
2011-07-31 17:57
回复
3#
jiang358519521
不支持test?
报错信息是啥?
作者:
Shell_HAT
时间:
2011-07-31 18:10
回复
3#
jiang358519521
中文输入法状态下的感叹号是不行滴
作者:
jiang358519521
时间:
2011-07-31 18:55
回复
5#
Shell_HAT
假设写一个SHELL脚本存在文件gate则执行将该文件内容显示,不存在就等待该文件出现。
用until怎么用。
作者:
shplpy
时间:
2011-07-31 20:21
回复
6#
jiang358519521
until [ -f gate ];do
sleep 3
done
cat gate
复制代码
作者:
xiaopan3322
时间:
2011-07-31 22:22
反过来啊……
作者:
zooyo
时间:
2011-07-31 23:07
提示:
作者被禁止或删除 内容自动屏蔽
作者:
waker
时间:
2011-08-01 08:31
until cat urfile 2>/dev/null; do :; done
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2