visit=2 link=2 download=2 while [ ($visit -eq 2) || ($link -eq 2) || ($link -eq 2) ] do vmstat |tail -1 >> per_test.log done 执行一个包含上述几行语句的shell脚本时,报错 four.sh: line 5: [: missing `]' four.sh: line 5: 2: command not found
各位大虾好,请问在solaris中用csh能不能如下写法:
while read rec
do
if($rec!="") then
echo $rec
fi
done
[code] #!/bin/bash while true do read a if [ "$a"="zzz" -o "$a"="ccc" ] then echo yes elif [ "$a"!="zzz" -o "$a"!="ccc" ] then #break or exit fi done [/code] 退不出while
在shell脚本中调用sql时涉及到一个分区的问题,所以我想使用while循环来一个个调用分区,但是本人第一次看shell脚本的东西,请各位多多指教
#!/bin/sh
set -x
n=0
while ((n<1000));
do
sqlplus user/pass@sid<
我是刚刚学习shell的新手。问问while的使用。 我想每3分钟统计一下系统当前目录下的文件和目录的总和,我这样做。 #while >ls|wc >done # 时间上我如何做内,我应该如何写呢。谢谢!
最近公司为了丰富我们的业余学习生活,准备给我们买书,请问下你是否知道有关unix shell好点的书,介绍个两本,不知道有没有本专门是讲实例的?谢谢 ~~~勇于拼搏~~~~
操作环境为sco unix505 字符行模式,中文支持:赛博中文. 编写shell目的,自动mount优盘及自动umount优盘,在其过程中,用一检测语句检测一下优盘插入电脑了吗?如果测入了,就自动mount并显示"请使用优盘" 优盘位置:/dev/dsk/1sC (优盘驱动已装,并可正常使用) 请教该如何编写呢?怎么判断优盘是否插入电脑了呢???