I have the following array inside a program:
... #code
$packages = [
'git', # version control
...
'iftop', # monitor network usage by ip
'iotop', # monitor io usage
]
... #more code
I want to use awk
to print lines from the first occurrence of $packages to the first ending ]
, after the occurrence of $packages
.
How can I do this?