Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project 3 - 5 ESTIMATED TIME: 5 0 minutes OBJECTIVE: Use the vi editor. DESCRIPTION: In this hands - on project, you create and edit

Project 3-5
ESTIMATED TIME: 50 minutes
OBJECTIVE: Use the vi editor.
DESCRIPTION: In this hands-on project, you create and edit text files using the vi editor.20. Press the Shift and ; keys together to open the : prompt at the bottom of the screen, type w sample2 and press Enter. What happened?
21
Press i to enter insert mode, and type the word test . Next, press Esc to switch to command mode. Press the Shift and ; keys together to open the : prompt at the bottom of the screen, type q , and press Enter to quit the vi editor. Were you able to quit? Why not?
22
Press the Shift and ; keys together to open the : prompt at the bottom of the screen, type q!, and press Enter to quit the vi editor and discard any changes since the last save.
23
At the command prompt, type ls and press Enter to view the contents of your current directory. Notice it now includes a file called sample2, which was created in Step 20. Type diff sample1 sample2 and press Enter to view the difference in content between the two files you created.
24
At the command prompt, type vi sample2 and press Enter to open the letter again in the vi editor.
25
Use the cursor keys to position your cursor on the line that reads Hi Bob, I hope this day finds you well.
26
Press the Shift and ; keys together to open the : prompt at the bottom of the screen, type s/Bob/Barb/g , and press Enter to change all occurrences of Bob to Barb on the current line.
27
Press the Shift and ; keys together to open the : prompt at the bottom of the screen, type 1,$ s/to/TO/g , and press Enter to change all occurrences of the word to to TO for the entire file.
28
Press the u key. What happened?

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

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

Students also viewed these Databases questions