- 论坛徽章:
- 0
|
脚本用途:比较选出来的两列值 其中一列的每个值是否在另外一列里,如果不在的话把这个值输出
我写的脚本:
dsmadmc -id=admin -password=admin << EOF
2 set sqldisplay wide
3 q noded testnode > nodev.txt
4 EOF
5
6 #awk 'NR>6 {printf "%s\n",$2}' nodev.txt >nodev.txt.new
7
8 nodev=`awk 'NR>6 {printf "%s\n",$2}' nodev.txt`
9
10 dsmadmc -id=admin -password=admin << EOF
11 set sqldisplay wide
12 q libv > libv.txt
13 EOF
14
15 #awk 'NR>4 {printf "%s\n",$2}' libv.txt >libv.txt.new
16
17 libv=`awk 'NR>4 {printf "%s\n",$2}' libv.txt`
18
19 for i in ${nodev}
20 do
21 for h in ${libv}
22 do
23 if ${i} -ne ${h}
24 then printf "no vol ${i}"
25 fi
26 done
27 done
运行时报错信息:
node.sh: line 23: CO0001: command not found
node.sh: line 23: CO0001: command not found
node.sh: line 23: CO0001: command not found
node.sh: line 23: CO0001: command not found
node.sh: line 23: CO0001: command not found
哪儿错了?怎样修改? |
|