Is it possible to use GNU grep to get a matched group from an expression?
echo "foo 'bar'" | grep -oE "'([^']+)'"
Which would output "'bar'". But I would like to get just "bar", without having to send it through grep one more time (ie. get the matched group). Is that possible?