has the following output
Code:
2220 -50
2220 -50
2220 -51
2225 -47
2225 -50
2230 -63
2230 -50
2235 -50
2235 -50
2235 -48
2240 -53
2240 -53
2245 -51
2245 -51
2250 -52
2250 -52
2250 -50
Code:
#!/bin/bash
#All unique numbers from file *:22:B0 will be in /tmp/uni
cat *:22:B0|awk '{print $2}'|sort -nu>>/tmp/uni
# max will number of unique numbers
max=wc -l /tmp/uni |awk '{print $1}'
for((i=1;i<$max;i++))
do
# pattern will have each unique number
pattern=`cat /tmp/uni|head -$i|tail -1`
#Following code should find out how many occurance of pattern are there in *:22:B0
cat *:22:B0|grep $pattern|wc -l
done
There is some syntax wrong in last line.
what is wrong?
