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.
When I saw this exercise, I imagined there would be a way to tell the sort utility which column you would like to use for sorting. However, before taking a look at that, I tried to solve this problem in another way:
What other ways there would be to solve this problem without using the '-k' flag from sort? How do you guys rate mine? Is there a way to simplify this definition? I am particularly interested in a way to "split" the stdin, so I could construct two subshells consuming from the same stdin, instead of storing in a variable "in".
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 →
When I saw this exercise, I imagined there would be a way to tell the sort utility which column you would like to use for sorting. However, before taking a look at that, I tried to solve this problem in another way:
What other ways there would be to solve this problem without using the '-k' flag from sort? How do you guys rate mine? Is there a way to simplify this definition? I am particularly interested in a way to "split" the stdin, so I could construct two subshells consuming from the same stdin, instead of storing in a variable "in".