Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribed

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 before

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

preliminary market research in south africa for CanManu

Answered: 1 week ago