Question: perform the commands in !#/bin/bash 4. Substitute the whitespaces in the sentence To be or not to be with underscores. Use echo and the pipeline

perform the commands in !#/bin/bash
4. Substitute the whitespaces in the sentence "To be or not to be" with underscores. Use echo and the pipeline to generate the sentence and pass it to standard input. Show how to perform the substitution both with sed and with tr. Since whitespace is a metacharacter in the shell, show how to handle it with all three quoting mechanisms (escape character, single quotes, double quotes). 5. Create a text file with 5 lines. Insert a line containing the string And the Oscar goes to... exactly at line number 3, and in doing so remove the previous line (see sed). 6. Create a text file with 5 lines. Insert a line containing the string And the Oscar goes to... exactly at line number 3, without replacing the previous line (see sed)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
