Need to check the value greater than or less than and give out put to a file

HI,

I have one file which is as below

cat /var/tmp/test1 | awk '{ print $3}'|grep -v affected
Data
----------
200.4

. The above 200 value is changable by the database script.
Now I need a script that checks the value 200.4 and the script shoud give out put if value is more than 225

... awk '  $3 > 225.0 { print $3 } ' ...

Awk rule block idea:

rule1 { do some
        }

rule 2 { do some 
         }

Awk process every block for every input lines.

You can interrupt block process in "this line" using command next in the block => skip to the next line.

Rule can be regexp rule, normal comparing, ...

BEGIN { # special block - has done before 1st line has readed
            FS=";"
            OFS="-"
         }

/^#/  ||  NF < 10 { # 1st char is  # - comment or not enough fields
           next
         }

/ABC/ ~ $1  { # field 1 include string ABC
                 }

$3 + $5 > 100 { print "so big value" 
                    }

$1 == $2  {  print "equal"
              }

END { # special rule, done after input has readed
       }

Nice short intro to awk! Minor comment: regex matching is done reversely : $1 ~ /ABC/ .

awk '/affected/ {next}
     $3 > 225.0 {print $3}
    '  /var/tmp/test1

should do the job for you.