HackerRank - 'Grep' - A
April - 25/2025Problem:
Given a text file, which will be piped to your command through STDIN, use grep to display all those lines which contain any of the following words in them: the, that, then and those
# Input
- From fairest creatures we desire increase,
- That thereby beauty's rose might never die,
- ...
# Output
- That thereby beauty's rose might never die,
- But as the riper should by time decease,
- ...
# Solution
grep -w -i -E "the|that|then|those"