GNU bug report logs - #8532
FAIL: cp/sparse-fiemap

Previous Next

Package: coreutils;

Reported by: dclarke <at> blastwave.org

Date: Thu, 21 Apr 2011 17:38:01 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 8532 <at> debbugs.gnu.org (full text, mbox):

From: "Alan Curry" <pacman-cu <at> kosh.dhis.org>
To: jim <at> meyering.net (Jim Meyering)
Cc: 8532 <at> debbugs.gnu.org, dclarke <at> blastwave.org
Subject: Re: bug#8532: FAIL: cp/sparse-fiemap
Date: Thu, 21 Apr 2011 15:43:41 -0500 (GMT+5)
Jim Meyering writes:
> 
> Dennis Clarke wrote:
> > FAIL: cp/sparse-fiemap
> ...
> > + awk '/^ *[0-9]/ {printf "%d %d ", $2 ,NF < 5 ? $NF : $5 } END {print ""}'
> > awk: cmd. line:1: /^ *[0-9]/ {printf "%d %d ", $2 ,NF < 5 ? $NF : $5 } END
> > {print ""}
> > awk: cmd. line:1:                                     ^ syntax error
> > + sed 's/ [a-z,][a-z,]*$//' ff1
> 
> Thank you for the report.
> What awk program and version are you using?
> I.e., awk --version might help.
> Also, what distribution are you using?

I can't figure out what version he's using, but Mr. Kernighan's awk doesn't
like that syntax either. Notice that if you changed the '<' to a '>' it would
be an output redirection for the printf. Using the '<' as a comparison
operator in the same position is awfully fragile.

Parenthesizing the ternary expression makes it happy again.

> 
> BTW, that syntax works for me using the latest gawk with or without -W compat,
> and with the mawk and nawk programs from debian unstable.

apt-get install original-awk

-- 
Alan Curry




This bug report was last modified 14 years and 96 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.