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.
To work this problem on a local system, you must ensure your input file contains tabs between fields. I pasted the text from a browser and then replaced repeated spaces with tabs using this:
sed-i-E's/\s{2,}/\t/g'/tmp/pasted-data.tsv
A nice way to confirm that you succeeded, display the columns of text by tab delimiter and expect it to look like a pretty table:
column-ts$'\t'/tmp/pasted-data.tsv
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Sort Command #5
You are viewing a single comment's thread. Return to all comments →
To work this problem on a local system, you must ensure your input file contains tabs between fields. I pasted the text from a browser and then replaced repeated spaces with tabs using this:
A nice way to confirm that you succeeded, display the columns of text by tab delimiter and expect it to look like a pretty table: