I'm trying to run an awk script which calls a bash command and uses the output to filter sonme results.
#!/usr/bin/awk -f
BEGIN {
cmd = system("ls -la")
cmd | $1 \~ /\[aA\]\[dD\]{2}\[rR\]{eE}\[sS\]{2}/ {print $0}
# Also tried
$1 \~ /\[aA\]\[dD\]{2}\[rR\]{eE}\[sS\]{2}/ {print $0} cmd
close(cmd)
}