I have a big c file that gives a lot of output that I don't care about right now. I wrote this awk script to do mostly what I want. Not sure how to put the finishing touches on it. I would also like it to write to a file when it gets the appropriate condition as true. Is this possible with awk? Or do I need to use a different program? ./a.out 50 5 4 | awk '{if ($1 ==success)    {    print success;    print $3;    //write to success file    }if ($1 ==failure)    {    print failure;    print $3;    //write to failure file    }if ($4 ==page)    print page;    //write to page file}'
awk print to file
awk