We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
'Sed' command #5
'Sed' command #5
Sort by
recency
|
91 Discussions
|
Please Login in order to post a comment
awk '{print3,1}'this code is sufficient to solve problem but to pass test case 3awk '{ out=(1:"") out=(2 OFS out : out) out=(3 OFS out : out) out=(4 OFS out : out) print out }'As simple as that.
sed -E 's/(\d{4}) (\d{4}) (\d{4}) (\d{4})/\4 \3 \2 \1/g'
pretty hardcoded but still works
Test case 3 does NOT confirm to the problem specification:
This works