You are viewing a single comment's thread. Return to all comments →
sed -E 's/([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)/\4 \3 \2 \1/'
The back-reference. \1, \2, \3, \4, etc. refer to the first, second, third, etc. parenthesized group in the regular expression.
sed -E "s/([0-9]{4}) ([0-9]{4}) ([0-9]{4}) ([0-9]{4})/\4 \3 \2 \1/"
{n} means "exactly n of the preceding expression" in a regular expression.
Seems like cookies are disabled on this browser, please enable them to open this website
'Sed' command #5
You are viewing a single comment's thread. Return to all comments →
The back-reference. \1, \2, \3, \4, etc. refer to the first, second, third, etc. parenthesized group in the regular expression.
OR
{n} means "exactly n of the preceding expression" in a regular expression.