|
From: | david kerns |
Subject: | Re: [bug-gawk] Is there a way to assign to a hash via the -v option |
Date: | Fri, 4 Mar 2016 15:22:33 -0700 |
Hi, I want to assign to a hash via the -v option. But the following
does work. Is there anyway I can do it with -v?
$ awk -v "x[1]=10" -v "x[2]=20" 'BEGIN{print x[1]; print x[2]}'
awk: fatal: `x[1]' is not a legal variable name
--
Regards,
Peng
[Prev in Thread] | Current Thread | [Next in Thread] |