I\'m pretty new at bash so this is a pretty noob question..
Suppose I have a string:
string1 [string2] string3 string4
I would like
Another awk:
awk
$ echo "string1 [string2] string3 [string4]" | awk -v RS=[ -v FS=] 'NR>1{print $1}' string2 string4