I'm currently using this one-liner to get the latest release version of
curl --silent "https://api.github.com/repos/docker/compose/releases/latest" | grep "tag_name" | sed -E 's/.*"([^"]+)".*/\1/'
This isn't my code.
I copied & pasted it, and it worked, and I wanted to learn more.
Specifically, I am very interested in the
Can anyone help me understand it better?
sed -E 's/.*"([^"]+)".*/\1/'
Essentially I don't understand any of the string.
I know the items individually
.* = any character one or more,
[^"] = accept anything that isn't
But when it is written in that way I am unsure how it works out.
Output of command without the
Output of command with the