nawk command not found

Guys, i have an issue. I tried to ran a script and the whole thing was fine.. except when i came to a part,

nawk '
BEGIN {
machine=0
then system prompted that the nawk command was not to be found...
I tried looking for the nawk command by using the "locate" command, and it returns nothing...

how do i solve this problem? thanks in advance people...
:confused:

What system are you using? 'nawk' on Solaris should be in the /usr/bin directory. Try using the command 'which nawk' to find where nawk is in your path.

My bad... am using linux.. don't think it caters right?

On a Linux system, you're likely using gawk (GNU awk). My /usr/bin/awk is a symlink to /usr/bin/gawk. You can see if they are compatible by changing "nawk" to "awk" in the command. If not, you'd need to track down and install nawk.

hi macosta, thanks for the info... i tried changing the script to use awk.. but i guess it doesn't work... as there were errors generated after that...
any info on how to install nawk in linux?

Can you post more on the error? One of the helpful awk experts here may be able to help - I thought gawk was mostly compatible with nawk...