I know the -v switch can be used to awk on the command line to set the value for a variable.
Is there any way to set values for awk associative array elements on the command line?
Something like:
awk -v myarray[index]=value -v myarray["index two"]="value two" 'BEGIN {...}'
Run Code Online (Sandbox Code Playgroud)