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.
This exercise has no sense. I know that it works with cut -d' ' -f4 but still the behaviour with lines that don't reach 4 words is absurd, the first word is returned or not depending on its position, and the sample to work with has no sense either: no line has 4 words so no output should be made for any of them.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Cut #7
You are viewing a single comment's thread. Return to all comments →
This exercise has no sense. I know that it works with cut -d' ' -f4 but still the behaviour with lines that don't reach 4 words is absurd, the first word is returned or not depending on its position, and the sample to work with has no sense either: no line has 4 words so no output should be made for any of them.