Re: unwanted expansion of variable with nested strings

2006-05-04 Thread Mike Frysinger
On Thursday 04 May 2006 00:44, Paul Jarc wrote: Mike Frysinger [EMAIL PROTECTED] wrote: $ foo=a b c $ gawk 'BEGIN {foo='${foo}'}' gawk: BEGIN {foo=a gawk:^ unterminated string This is normal. man bash: # Word Splitting # The shell scans the results of parameter

Re: unwanted expansion of variable with nested strings

2006-05-04 Thread Mike Stroyan
A little more bash syntax can quote newlines for awk. $ foo=a b c $ lf= $ gawk 'BEGIN {foo='${foo//$lf/\\n}'} END {print foo}' /dev/null a b c -- Mike Stroyan [EMAIL PROTECTED] ___ Bug-bash mailing list Bug-bash@gnu.org

Re: unwanted expansion of variable with nested strings

2006-05-04 Thread Mike Frysinger
On Thursday 04 May 2006 11:08, Mike Stroyan wrote: A little more bash syntax can quote newlines for awk. this is when you start using gawk -v foo=$foo ... i was using gawk as an example of my variable expansion question, not as a way to figure out how to pass a variable into gawk -mike

Re: unwanted expansion of variable with nested strings

2006-05-04 Thread Mike Frysinger
On Thursday 04 May 2006 11:37, Paul Jarc wrote: Mike Frysinger [EMAIL PROTECTED] wrote: On Thursday 04 May 2006 00:44, Paul Jarc wrote: What do you mean by fail? What do you want to happen in this case? i meant gawk hates it ... not bash Ok, and what about the second question? there

unwanted expansion of variable with nested strings

2006-05-03 Thread Mike Frysinger
ignoring the fact that i can pass in variables to gawk using the '-v' option, i'm wondering if this is a bug in how bash expands variables to pass to programs ... i couldnt pick out anything under EXPANSION, but that's probably just because i missed it ;) take for example: $ foo=a b c $ gawk

Re: unwanted expansion of variable with nested strings

2006-05-03 Thread Paul Jarc
Mike Frysinger [EMAIL PROTECTED] wrote: $ foo=a b c $ gawk 'BEGIN {foo='${foo}'}' gawk: BEGIN {foo=a gawk:^ unterminated string This is normal. man bash: # Word Splitting # The shell scans the results of parameter expansion, command substitu- # tion, and