I have a shell script where there are 2 awk strings.
first_awk='
BEGIN {
}
{
# create some array here..
}
END{
}
'
second_awk='
BEGIN {
}
{
## Access the array created in first awk section.
}
END{
}
'
Is it possible to do something like above? Accessing an array created in first awk section in the later awk section?
Or, can I have an array declared in enclosing shell script and access that in both the awk strings?