Wierd awk error (2nd try)

Paul Howarth paul at city-fan.org
Fri Feb 25 08:44:16 UTC 2005


On Fri, 2005-02-25 at 17:39 +0900, Torben M. Hansen wrote:
> Hi All
> 
> Sorry about the last mail. I don't know what happened. I hope this is 
> readable.

Just as readable as the first try, which looked fine here.

> I'm trying extract some data from a file using awk. However I get errors that
> I don't understand.
> 
> My awk file looks like
> /= DATASET/     { ds = $3; }
> /xangst/        {if (ds == 1) {ln = 1; print $2,$3,$4 }}
> {if ((ln > 0) && (ln < 61))     {if (ln!=1) {print $1,$2,$3} ln+=1 }}
> 
> and I execute it with
> awk -f crds.awk c60*.out
> but get the following error
> awk: crds.awk:3: /x
> awk: crds.awk:3:  ^ invalid char '' in expression

You've probably got some strange non-printing character in your file.

What's the output of:
$ od -c crds.awk

Paul.
-- 
Paul Howarth <paul at city-fan.org>




More information about the fedora-list mailing list