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 'BEGIN {foo="'${foo}'"}' gawk: BEGIN {foo="a gawk: ^ unterminated string this being because bash executed: argv[0] = gawk argv[1] = BEGIN {foo="a argv[2] = b argv[3] = c"} when really i wanted: argv[0] = gawk argv[1] = BEGIN {foo="a b c"} 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" -mike _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash