rochejmike
Technical User
x,x,5428,x,5443,x,1,2,'Cable Depth : 10.8 m : S13 : Rx-grp
x,x,5444,x,5445,x,1,2,'Cable Depth : 10.8 m : S13 : Rx-grp
x,x,5434,x,5447,x,509,521,'Cable Depth : 10.6 m : S06 : Rx-grp
x,x,5443,x,5447,x,71,73,'Cable Depth : 10.9 m : S18 : Rx-grp
x,x,5401,x,5448,x,1,16,'Cable Depth : 10.4 m : S01 : Rx-grp
x,x,5446,x,5451,x,1,1,'Cable Depth : 10.9 m : S13 : Rx-grp
The above is an excerpt for a text file that I am trying to filter. What I need is to list out any lines with numbers in the first field seperated by colon's (10.8 m 10.6 m etc) where the numer is greater than 13.5 and less than 10.5. I suspect the 'm' is getting in the way of the filter ? What I have so far is
awk 'BEGIN {FS=":"} $2 ~ ($2 >= 11.5 ) {print} ' FILE.txt
but the result I get doesnt match what I know the correct number of entries to be. Any thoughts ?
Regards
x,x,5444,x,5445,x,1,2,'Cable Depth : 10.8 m : S13 : Rx-grp
x,x,5434,x,5447,x,509,521,'Cable Depth : 10.6 m : S06 : Rx-grp
x,x,5443,x,5447,x,71,73,'Cable Depth : 10.9 m : S18 : Rx-grp
x,x,5401,x,5448,x,1,16,'Cable Depth : 10.4 m : S01 : Rx-grp
x,x,5446,x,5451,x,1,1,'Cable Depth : 10.9 m : S13 : Rx-grp
The above is an excerpt for a text file that I am trying to filter. What I need is to list out any lines with numbers in the first field seperated by colon's (10.8 m 10.6 m etc) where the numer is greater than 13.5 and less than 10.5. I suspect the 'm' is getting in the way of the filter ? What I have so far is
awk 'BEGIN {FS=":"} $2 ~ ($2 >= 11.5 ) {print} ' FILE.txt
but the result I get doesnt match what I know the correct number of entries to be. Any thoughts ?
Regards