Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I ONLY NEED HELP WITH PART C BUT YOU NEED PART A TO DO C, THANK YOU. . Start vim to create a new file

I ONLY NEED HELP WITH PART C BUT YOU NEED PART A TO DO C, THANK YOU.

. Start vim to create a new file named pizza. [Nothing to submit]

2. Type i (lowercase i for input) to put vim in Input mode and enter the following text, pressing RETURN at the end of each line. Ignore typing mistakes you make for now. Press ESCAPE when you are done typing to put vim back in Command mode. [Nothing to submit]

Pizza is an oven-baked, flat, round bread

typically topped with a tomato sauce, cheese

and various toppings. Pizza was originally

invented in Naples, Italy, and the dish has

since become popular in many parts of the world.

3. Use the ARROW keys to move the cursor so that it is over the o in originally. Press the x (delete character) key ten times to delete each of the letters in originally. The editor should remain in Command Mode throughout this step. [Nothing to submit]

4. Search for the word Italy by first pressing the / (forward slash) key. Pressing this key puts vim in Last Line mode; the cursor moves to the bottom line of the screen. Now type Italy and press RETURN to search for the word Italy. Delete the word Italy by giving the command dw (delete word). The comma and the following SPACE remain. You could remove them using the x command, but this step introduces a different command. [Nothing to submit]

Before you can try removing Italy another way, you must restore the word you just deleted. Type u (undo) to undo the last command you gave; Italy reappears. Whereas dw deletes a word but not adjacent punctuation, dW deletes the word including adjacent punctuation. Give the command dW. [Nothing to submit]

5. The ? (question mark) searches backward for a string of characters the same way the / searches forward. Search backward for the word topped by typing ?toppedfollowed by RETURN. The cursor is now on the t in topped. [Nothing to submit]

6. The cw (change word) command removes a word and puts vim in Input mode so you can type a word to replace the original one. You must press ESCAPE to return vim to Command mode when you are finished typing the new word. With the cursor on the first letter of topped, give a cw command and type the word coveredfollowed by an ESCAPE. [Nothing to submit]

7. The o (open) command opens a blank line below the line the cursor is on, moves the cursor to the new line, and puts vim in Input mode. The O command works the same way except it opens a line above

the one the cursor is on. With vim in Input mode and the cursor on a blank line, you can enter as many lines of text as you like. When you are done, press ESCAPE to return vim to Command mode. Give an H (home) command to move the cursor to the first letter of the document you are editing. Give an O command to open a line above the document and type the title PIZZA followed by a RETURN and an ESCAPE. [Nothing to submit]

8. Save your work and exit from vim by giving the command ZZ. If the ZZ appears in the document, vim is in Input mode. Press ESCAPE to put vim back in Command mode, use the x command and ARROW keys to remove the ZZ, and give another ZZ command. [Submit the final results of your pizza file)

PART C

Write a single bash shell script to accomplish the following steps. If you are having difficulty [Show your work]

Step 1: Stating with the practice file that you create in part A, write a script that calculates the number of words in the file. Remember, in general, scripts are meant to be portable, so be sure to use absolute paths when possible.

Step 2: Then divide the result of Step 1 by the current day of the month.

Step 3: Multiple the result of step 2 by your parent bash shell process identification number.

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

Database Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

Students also viewed these Databases questions

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago