awk / grep

how do I change this line to use the awk command

RC19=`grep -c "Broken pipe" $FTP_OUT`
RC19=$(awk '/Broken Pipe/{i++}END{print i}' $FTP_OUT)
RC19=`awk '/Broken pipe/ {c++} {next} END {print c}' $FTP_OUT`

This is an odd request - please, what are you trying to accomplish - not whether it is awk or sed or grep?

RC19=`awk '/Broken pipe/{n++}END{print n}' $FTP_OUT`

how do I modified this line of code to ignore the �504 unknown security mechanism� message, but still pay attention to all other 504 type messages.

This is the command we are useing in our FTP error checking script.

RC27=`grep -v bytes $FTP_OUT | cut -c 1-3 | grep -c 504`

Show some sample input and output. I'm guessing this could be done like awk '!/bytes/ && /504/ && !/unknown security/ { print $1 }' but without seeing the input that's only a guess.