Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Instructions: Write the commands needed to solve the following problems on mis01.scu.edu. Before solving each exercise, position yourself in /home/OMIS107/Lecture2. All of these exercises
Instructions: Write the commands needed to solve the following problems on mis01.scu.edu. Before solving each exercise, position yourself in /home/OMIS107/Lecture2. All of these exercises are on alice.txt. Unless otherwise specified, all problems must be solved with one command only Unless otherwise specified, don't worry about uppercase/lowercase. . Problem 1 Position yourself in /home/OMIS107/Lecture2. Print the lines of alice.txt that contain at least two words (not necessarily consecutive words) starting with "a", both composed of at least 8 more letters after "a". Problem 2 Add "his or her majesty" before the occurrences of the word "the" + word starting with a capital letter and the word "a" + word starting with a capital letter, as in these examples: Problem 3 To emphasize a verb in past tense, one could add "did" before it and turn the verb into present tense. Assume that all words ending with "ed" are verbs in past tense (e.g., invented, asked). Find all words ending in "ed", add "did" before them and turn them into present tense. For example: "the Hatter" "his or her majesty the Hatter" "a Caterpillar" "his or her majesty a Caterpillar" "Vanilla Ice cream" "Vanilla Ice cream" (unchanged because "a" is not a word) "You invented it" "you did invent it" "Alice asked a question" "Alice did ask a question" "She asked." "She did ask." "They need." "They did ne." (do not worry about whether removing "ed" is grammatically incorrect) Problem 4 The goal of this exercise is to replace the occurrences in alice.txt that contain the word "said" + other words + punctuation mark with 'said someone' + punctuation mark. By "punctuation mark", we mean any of the following characters, .:; Some examples: 1. Line 3300: 'I won't!' said Alice. 'I won't!' said someone. 2. Line 3314: 'Wake up, Alice dear!' said her sister; 'Why, what a long sleep you've 'Wake up, Alice dear!' said someone; 'Why, what a long sleep you've 3. Line 396: but it said nothing. but it said someone. If the word "said" is followed by more than one punctuation mark in the same line, make sure to replace only up to the first punctuation mark. That is, the following replacement for example 2 is wrong: 'Wake up, Alice dear!' said someone, what a long sleep you've
Step 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