I am trying to do the following:
echo "test++abc" | awk -v bar="test++" 'BEGIN {FS=bar} {print $2}'
I am expecting to see abc as the output, because I used bar="test++" as the separator. But I am getting ++abc instead.
Can anyone please explain this behavior and how to fix it?
Thanks a lot!
1 Answer