HackerRank - Cut #7
April - 25/2025Problem:
Given a sentence, identify and display its fourth word. Assume that the space (' ') is the only delimiter between words.
# Input
- Hello
- World
- How are you
# Output
- Hello
- World
# Solution
cut -d ' ' -f 4
# Solution_01
while read line
do
echo "$line" | cut -d " " -f 4
done
Post:
- - Cut #8;