|
From: | Richard Nolde |
Subject: | Re: Possible bug in Gawk 3.1.3-7 under Fedora Core 2 |
Date: | Fri, 09 Jul 2004 13:42:56 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 |
Bill Rugolsky Jr. wrote: Bill, That does in fact make it work, but why the change and when was it documented? The sample on page 230 of "Sed and Awk" 2nd edition by Doughtery and Robbins (who ought to know) uses the quoted external command but without any variable interpolation. eg "date", so it is unclear that the parens now need to be added to scripts that worked before. Thanks, Richard
On Fri, Jul 09, 2004 at 03:08:27PM -0400, Andrew J. Schorr wrote:On Fri, Jul 09, 2004 at 08:55:47AM -0600, Richard Nolde wrote:awk -v DESTDIR=$DATADIR ' \ { "dirname " $1 | getline DIRNAME "basename " $1 " .001" | getline BASENAME #### >>>>> The two previous lines appear to fail <<<<< #####This can be seen in a much simpler example: address@hidden: echo "foo/bar" | gawk '{"dirname " $1 | getline DIRNAME; print $1,DIRNAME}' sh: line 1: foo/bar: No such file or directoryfoo/barIt is simply a precedence issue: $ echo "foo/bar" | gawk '{("dirname " $1) | getline DIRNAME; print $1,DIRNAME}' foo/bar foo Regards, Bill Rugolsky
[Prev in Thread] | Current Thread | [Next in Thread] |