Create an exrc file

Assignment Help Operating System
Reference no: EM131465020

EXERCISE 1 -

The file hamlet will be used for these exercises. Write in command and/or result of activity

Key in the file "Hamlet" provided as an attachment.

Then enter input mode with i (or a) and enter text. Strike "ESC" key to re-enter command mode when you are finished. Then save the file by typing: wq

1. Invoke vi on the file:

2. Go to line 10 of the file.

3. Go to the first line of the file.

4. Go to the last line of the file.

5. Go up 5 lines.

6. Go forward 3 words.

7. Go back to the first line of the file.

8. Go to the end of this line.

You can leave vi now if you wish by typing   :q  (or  :q! ).

EXERCISE 2 -

In this exercise you are going to add some text to the file hamlet. Write commands.

1. Invoke the vi editor on your copy of the file hamlet.

2. After line 5, add a new line of text.

3. At the end of line 2, add a word.

4. At the beginning of line 4, insert a word.

5. Insert 2 new lines of text before the first line.

6. Append 3 new lines of text after the last line.

7. Go to the top of the file. Now delete the first 14 lines with one command.

8. That was an error.-Undo it.

9. Delete the current character.

10. Quit vi without saving your changes by typing:  :q!

EXERCISE 3 -

In this exercise you create an .exrc file.

1. First make sure you are in your home directory by typing cd  enter

2. Then invoke the vi editor by typing:

If .exrc already exists, vi will display it. Otherwise, vi will create it.

3. If the file already exists, but its contents aren't acceptable delete whatever you do not want with dd or dw.

4. Enter input mode by typing i (or a) and enter:

5. Strike "ESC" to enter command mode, then type:

This saves the file. The next time you edit something, showmode, number, and wrapscan (or whatever your file contains) should all be in effect. "wrapscan" will be described in the next section.

EXERCISE 4 -

1. Edit hamlet and change the name of this play to gamlet.

2. Go to the 3rd word on line 6 and delete it.

3. Search for and delete the first occurrence of the word "and". Now repeat this change throughout the file.

Hint: Use the techniques for repeating a search and repeating a command.

4. Use delete and put commands to make a copy of the last line of the file so that the last 2 lines of the file are identical.

5. Now move one copy of this line before the first line of the file.

6. Find the first and then the second occurrence of the word "the". (Do not change "whether".)

Quit  vi  without saving your changes by typing:  :q!

EXERCISE 5 -

1. Edit Hamlet one more time and make any changes you wish (as long as those changes are easily recognizable).

Now save your work (but do not quit).

2. Make some more easily recognized changes and save your work under the name hamlet1 (but do not quit).

3. Without quitting vi, find out what directory you are working in by using the command pwd.

Hint: You will have to use a colon command  to have a subshell issue this command.

4. Make one more change to your current buffer. Now try to quit without saving your work, by typing:  :q

5. What happened? Try it again, only be more emphatic this time.

Attachment:- Assignment Files.rar

Reference no: EM131465020

Questions Cloud

Write brief description of three challenges a social worker : Write a brief description of three challenges a social worker might face when developing a genogram with an individual or family.
Example of our legal system finding a loophole : Is this an example of our legal system finding a loophole in the law and attempting to extract a large financial settlement with a successful corporation?
Security controls are the mechanisms : Security controls are the (main) mechanisms/means used to reduce risk consequence and risk likelihood:
Determine whether the current organizational structure : Determine whether the current organizational structure at Domino’s is a good match for its corporate strategies
Create an exrc file : In this exercise you create an .exrc file. First make sure you are in your home directory by typing cd enter
Create programs in the k-12 school for asthma management : Discuss your programs, paying special attention to different developmental stages of children. Include interventions for early childhood.
Earned value management : Your business sponsor is not familiar with earned value management (EVM).
Why the skills and training of project managers have changed : Why the skills and training of project managers have changed over time. Give your opinion as to whether these changes have been good for business.
Consider many means of differentiating products and services : Consider the many means of differentiating products and services.

Reviews

Write a Review

Operating System Questions & Answers

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Develop a user mode command interpreter

Develop a user mode command interpreter which support list-short.

  Memory allocation in operating system

Analysis and implementation of algorithms for memory allocation in operating system, Explain First- t and best- t methods are used in memory allocation in operating systems.

  Stand alone child process

Forking the child process

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Simulating operating systems scheduling

Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

  Issues with trusted platform module

Research paper discussing the issues with Trusted Platform Module (TPM)

  Threads

Explain a complication that concurrent processing adds to an operating system.

  Design and programming

Use the semaphore methods to control the concurrency of the solution

  Virtual machines

Virtual machines supported by a host operating system

  Discuss an application that benefits barrier synchronization

Discuss an application that would benefit from the use of barrier synchronization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd