[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gawk] Is there a way to assign to a hash via the -v option
From: |
Peng Yu |
Subject: |
[bug-gawk] Is there a way to assign to a hash via the -v option |
Date: |
Fri, 4 Mar 2016 14:56:17 -0600 |
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
- [bug-gawk] Is there a way to assign to a hash via the -v option,
Peng Yu <=