What command would you use to save the file

Assignment Help Operating System
Reference no: EM132077723

Need help with this linux Operation System command.

Module 9 Practical Application (28 points)

Display the complete command that will accomplish the following actions. (ie. If you were asked which command would allow you to navigate to the /var directory you would display the following: cd /var (NOT just the command cd))

Vi Editor

1. Using the vi editor:

Create a document with four lines, each containing the word "today."

What command would you use to copy the first four lines using only one command?

What command would you use to save the file, and exit vi? Reopen the document.

What command would you use to change"today"to"yesterday" but only on the first four lines?

2. Using the vi editor:

Create a document called first.file, and enter a few lines of text in it. Save it.

Create a second document called second.file, and enter a few lines of text in it. Save it.

What commands would you use to create a third document called third.file by merging the text from the first two files? (3 pts)

3.Delete all text from third.file that you created using vi.

What command would you use to restore the data you just deleted?

4. Using the vi text editor create a file with 12 lines of text and on the fifth line insert your first and last name. What command would you use to go to the first line of the file?

What command would you use to search the file for your last name?

What command would you use to save the file, but not exit vi?

Without exiting vi, temporarily execute the ls command to confirm that the file is saved.

What command did you use temporarily leave vi (without exiting it) so you could execute t he "ls" command?

What command can you use that will cause line numbers to appear?

Scripting

5. Next, use the command to add your current working directory to the PATH variable. (2 points)

6. What command will create a variable called iam and assign the results of the whoami command to it?

7. Assign the variable t the value of 20. Next, assign the variable s the value of t+30. Finally, display the contents of t and s to verify you have correctly defined these variables. (4 points)

8. Create a script called lunch with a for loop that uses the variable sandwiches and then displays a line at a time the following sandwiches: chicken, ham, hummus, tomato. (5 points)

9. Someone wrote the following script but it doesn't work and you've been asked to troubleshoot it.

What is wrong with the following lines of code? (4 points)

While [ "$value" = "100" ; do ECHO "That's a large number." read value

fi

Reference no: EM132077723

Questions Cloud

What rate is the current changing : When the resistance is 400 ohms and the current is 0.01 amperes, at what rate is the current changing?
Create a class person and clerk derived from person : The Person class should have instance variables and Clerk class should have the additional information of a salary and an employmentgrade.
Calculate the npv of the given project : Sanders Enterprises, Inc., has been considering the purchase of a new manufacturing facility for $276,000. The facility is to be fully depreciated.
Find the rate of change of the distance : Find the rate of change of the distance from the particle to the origin at this instant.
What command would you use to save the file : Create a document with four lines, each containing the word "today." What command would you use to copy the first four lines using only one command?
Right circular cone of radius r : Suppose that a right circular cylinder of radius r and height h is inscribed in a right circular cone of radius R and height H.
What is the interest tax shield for the year : Sand Mountain Resort has a tax rate of 32 percent. Its total interest payment for the year just ended was $41,000. What is the interest tax shield for the year?
How the command to abbreviate the command alias as a : Please show the command to set the noclobber option to protect from accidentally deleting a file.
Determine whether the integral is divergent or convergent : Determine whether the integral is divergent or convergent. If it is convergent, evaluate it. If it diverges to infinity, state your answer as INF

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