Finally, your program should handle errors gracefully. For example, if the command line arguments are supposed to be files, and the user specifies a non-file, you should print a descriptive error message on standard error, and either exit or not exit as you see fit.
The quick brown fox jumped over the very lazy and anemic blue-tick liver-spooted sad and lonely hound dog.the output would be
hound dog. liver-spooted sad and lonely anemic blue-tick very lazy and fox jumped over the The quick brownHINT: You can add things to the lines to help change their order so long as you delete those things before you print the lines out. This will take utilities from the previous lectures, as well as this one, to solve.
last_name, first_nameon standard input, and prints them out as
first_name last_nameon standard output. You can use the example_name_file as an example input file. (Hint: use subpatterns)
Even though you instruct the participants to email you the list in that format, people always do irritating things, like list multiple teams per line (separated by a comma), abbreviate teams, put numbers before or after the team to denote where they should go on the list, etc.
Your job is to write the shell script fixit, which takes an email file on standard input, and produces the correct format (just a list of 10 teams, spelled correctly) on standard output. There are 7 sample email entries in the files entry1 through entry7. Your program should fix them all!
From email_address other-stuffand ends with a blank line. Following the header is the body, which can contain any text except a line beginning with the word ``From''. The header of the next message follows the body of the previous message.
mail_strip takes each mail message and puts it into a separate file. The file name for each message should be the email address of the sender. If there are multiple messages from the same sender (or if the file with the sender's name already exists), then append the message to that file. mail_strip should not destroy the original mail file.
mail_strip should detect if a file is not a mail file.
The version of mail_strip in my example programs directory is a C program. This is because there would be problems with me creating files in your directory if I used the same trick as I usually do. The result is that my mail_strip works blazingly fast. Yours can be much, much slower.
You can find an example mail file in example_mail_file. When you run it, it should not make files called bigbill@ovaloffice.gov or mjordan@bulls.com.
This was the only program where I used ed in the shell script.