From: Peter Freddolino (
Date: Sat May 12 2007 - 16:07:48 CDT

Hi Robert,
I don't have the tutorial in front of me currently, but I can suggest
the variant

cat ubq_ww_pcv.log | awk '$1 == "SMD" {print $0}' > analysis/smd.dat

(please copy/paste to preserve spacing and such)

In awk, $1 is automatically defined to be the first column of each line
being processed.


baxy wrote:
> Hi,
> I have a problem with executing following command: cat ubq_ww_pcv.log | awk '{if ($1=="SMD") print $0}'> analysis/smd.dat
> it returns me the following message :
> can't read "1": no such variable
> which seams logical to me, because i don't remember defiing that variable, so please instruct me what to do what did or didn't i do.
> robert
** Visit for more info on majordomo