HackerRank - Grep #1
April - 25/2025
Problem:
You are given a text file that will be piped into your command through STDIN. Use grep to display all the
lines that contain the word the in them. The search should be sensitive to case. Display only those lines of
the input file that contain the word 'the'.
# Input
- From fairest creatures we desire increase,
- .
- .
- .
- Shall sum my count, and make my old excuse'
# Output
- But as the riper should by time decease,
- .
- .
- .
- Where all the treasure of thy lusty days;
# Solution
grep -w 'the'
Post: