You are viewing a single comment's thread. Return to all comments →
a longer solution, similar to the the use of the ternary operator:
awk '{if (NR%2) {ORS=";"} else {ORS="\n"}} {print}'
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
'Awk' - 4
You are viewing a single comment's thread. Return to all comments →
a longer solution, similar to the the use of the ternary operator:
awk '{if (NR%2) {ORS=";"} else {ORS="\n"}} {print}'