[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: unwanted expansion of variable with nested strings
From: |
Aharon Robbins |
Subject: |
Re: unwanted expansion of variable with nested strings |
Date: |
Thu, 04 May 2006 18:00:18 +0300 |
> Date: Thu, 04 May 2006 10:38:52 -0400
> From: Mike Frysinger <address@hidden>
> Subject: Re: unwanted expansion of variable with nested strings
> To: Aharon Robbins <address@hidden>
> Cc: address@hidden
>
> On Thursday 04 May 2006 10:29, Aharon Robbins wrote:
> > In article <address@hidden> you write:
> > >On Thursday 04 May 2006 00:44, Paul Jarc wrote:
> > >> Mike Frysinger <address@hidden> wrote:
> > >> > so if i quote ${foo} like so:
> > >> > $ gawk 'BEGIN {foo="'"${foo}"'"}'
> > >> > it'll work in this case, but then fail if foo contains newlines:
> > >> > foo="a
> > >> > b
> > >> > c"
> > >>
> > >> What do you mean by "fail"? What do you want to happen in this case?
> > >
> > >i meant gawk hates it ... not bash
> >
> > Why are you surprised?
>
> who said i was surprised ? i was making note of the issues i encountered wrt
> to bash by using gawk as an example ... i never said gawk was doing anything
> wrong
> -mike
Fair enough. It's not always possible to tell from emails in the bug
list what peoples' expectations are... :-)
Combining shell and awk quoting is always a challenge. There's some
discussion of it in the gawk manual but it's not easy to deal with
no matter what.
Thanks,
Arnold