Suppose file \'grapiest\" has the following text: When you know it\'s your bedti
ID: 3575134 • Letter: S
Question
Suppose file 'grapiest" has the following text: When you know it's your bedtime, so turn off the light, say all your prayers and then, Oh you sleepy young heads dream of wonderful things, Beautiful mermaids will swim through the sea, And you will be swimming there too. What is the output of each of the following grep commands? Please write down the line numbers on grep "^S.u" grapiest; Line Number; _ grep -E "sw.+ng" grapiest; Line Number; _ grep"." grapiest: Line Number: _ grep "a.$" grapiest: Line Number; _ grep "[^aA]nd''greptest: Line Number. _ grep"^[AS].*, $" grapiest: Line Number:_Explanation / Answer
grep "S.*u" greptest: Means all lines that start with S, and has a u inbetween.
Which will return lines 2, and 3.
grep -E "sw.+ng" greptest Will list all line that has sw, and then ng in it.
So, the line with word swimming do qualify the test.
Which will return line 6.
grep "." greptest All the lines that has a . in it.
Which will return line 6.
grep "a.$" greptest All the lines that has the penultimate letter a.
Which will return line 5.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.