Answered step by step
Verified Expert Solution
Question
1 Approved Answer
perform the commands in !#/bin/bash 5. Create a text file with 5 lines. Insert a line containing the string And the Oscar goes to... exactly
perform the commands in !#/bin/bash
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). 7. Suppose you want to write the same letter to many people except that you want each letter addressed to the senders personally. This can be created using a shell script. Put the names of the recipients (one per line) in a file called names. Create a textfile called template which has the string NAME wherever you want the person's name to appear (e.g., Dear NAME, ...). Finally, write a script that produces one file per name (call each file using the person's name with suffix .txt), containing the personalized letter obtained from the template file (use sed). 8. Write a script that takes a string as command line argument corresponding to a filename, sorts the lines of the input file in reverse alphabetical order, and stores the result to a file whose name has in addition the suffix_sorted (use sort). Test your script on the file names created before. 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). 7. Suppose you want to write the same letter to many people except that you want each letter addressed to the senders personally. This can be created using a shell script. Put the names of the recipients (one per line) in a file called names. Create a textfile called template which has the string NAME wherever you want the person's name to appear (e.g., Dear NAME, ...). Finally, write a script that produces one file per name (call each file using the person's name with suffix .txt), containing the personalized letter obtained from the template file (use sed). 8. Write a script that takes a string as command line argument corresponding to a filename, sorts the lines of the input file in reverse alphabetical order, and stores the result to a file whose name has in addition the suffix_sorted (use sort). Test your script on the file names created beforeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started