Append the last two lines of each file to the file

Assignment Help Database Management System
Reference no: EM13950250

This is the previous project:
I am trying to complete this UNIX shell assignment using the following criteria:
* Boot your PC with Knoppix and set you working directory to the removable media.
* Create a directory for each week of the course called week1, week2, week3, week4, and week5 on the removable media.
* Change the working directory to week1 and create a file called "scales" that contains the days of the week (Sunday, Monday etc) with each day on a separate line without using an editor (use cat command)
* Sort this file and append the results to the same fiel, "scales".
* Append the results of the pwd command to the "scales" file.
* In the week1 directory creat the subdirectories and fils as shown:
(consider week1 to be equivalent to $HOME)
touch birds.dat
mkdir water trees
cd water
mkdir oceans seas
cd oceans
touch atl.dat
touch pac.dat
cd ../seas
touch Red.dat
touch Black.dat
cd ~/week1/trees
touch Oak.dat
touch Pine.dat

Place the output of the history command in a file named "scales".

In your week2 directory create two identical files. Name one "scales".ed1 (e.g. miller.ed1) and the other "scales".vi (e.g. miller.vi). The contents of the two files should be:
There once was a man from Nantucket,

Who carried his lunch ina bucket,

Saih he with a sigh,

I am very full As he ate a whole pie,

Using an editor available in your Konsole window that is not the vi editor edit the *.ed1 file:
Add the following line after the last line:
If I just had a donut I'd dunk it.

Remove all text on the fourth line before the word As
Correct misspelled words ina and Saih
Save the file and exit the editor

Using the vi editor on the *.vi file
Add the following line after the last line:
If I just had a donut I'd dunk it.

Remove all text on the fourth line before the word As
Correct misspelled words ina and Saih
Change the limerick so it reflects a woman instead of a man (change all occurrences of man to woman, his to her, and he to she) using search and replace feature
Save the file and exit vi
Place the word count of the two files in a file called "scales".out

Change Nantucket to Pawtucket in the *.ed1 file using the sed command
Append the last two lines of each file to the file called "scales".out without cutting and pasting (Hint: tail command can do this)

Find the differences between the two files and append the result to the file called "scales".out (Hint: diff command can do this)
Use grep to find files contaning Pawtucket and append the output to the file called "scales".out
In your week2 directory create the script in Project.3-7 and name it "scales".3-7

Project 3.7:

In this project, you use additional arithmetic operators in the ((expression)) commands. The goal of this project is to reinforce your understanding of arithmetic operations.
Log in to the Linux system as a user, and then open a Terminal emulation window.
Create a shell script named Project3-7 located in a directory supported by the File System Hierarchy Standard.
The script needs to perform the following pseudocode in the order shown:

Save the file, and then close the editor.
Execute the script, and then record the commands used.
Record or print your script.
Close your window, and then log out.

Please send all files associated as I am pretty lost and I can not follow the logic wihtout getting totally confused. I appreciate your time and efforts.

Reference no: EM13950250

Questions Cloud

Calculate the environmental cost per pound for each product : Calculate the environmental cost per pound for each product. Which of the two appears to cause the most degradation to the environment?
Strongest of the species that survives : "It is not the strongest of the species that survives, nor the most intelligent that survives. It is the one that is the most adaptable to change."
Determine the steam quality at the turbine exit : For T 5 808F, determine the steam quality at the turbine exit, the steam mass flow rate, in lb/h, and the thermal efficiency. Plot the quantities of part (a) versus T ranging from   80 to 1058F.
Dna and the steps of protein synthesis : Describe the structure of DNA and the steps of protein synthesis. Describe the relationships between the following terms:
Append the last two lines of each file to the file : Find the differences between the two files and append the result to the file called "scales".out (Hint: diff command can do this)
Does the life-cycle cost approach have limitations : Use the cost information and calculate an environmental impact cost per 1,000 kg of surfactants. Which of the two approaches would you now recommend? Does the life-cycle cost approach have limitations? Explain.
Rate of heat transfer to the steam : Steam enters the turbine of a Rankine cycle at 16 MPa, 5608C. The condenser pressure is 8 kPa. The turbine and pump each have isentropic efficiencies of 85%, and the mass flow rate of steam entering the turbine is 120 kg/s. Determine
Select the primary keys for each table in your list. : Using the final table list you created for Learning Event 3, select the Primary Keys for each table in your list. Then, select one of your tables and complete field specifications for each field.
Commercial milk-processing industry began to evolve : After the 1850's, several advancements occurred and the commercial milk-processing industry began to evolve. Select an element/development you think is the most important and justify why you feel this way

Reviews

Write a Review

Database Management System Questions & Answers

  Which method would be efficient for planning proactive

Dual Assessment of Data Quality in Customer Databases,Journal of Data and Information Quality (JDIQ), Volume 1 Issue 3, December 2009, Adir Even, G. Shankaranarayanan.

  Develop a flowchart and provide a brief explanation for it

Develop a flowchart and provide a brief explanation for it

  Database application development question

Submit an Executive Memo addressed to the CIO and the board of directors. Last week, the CIO reviewed your presentation and has decided to move forward with your recommendations for improvements.

  How replication works with distributed database

Provide an example of what kind of application would be able to take advantage of a distributed environment. Support your suggestion.

  Convert the order year into a decade and count the orders

Using the database attached to Lecture 2, let's say you are interested (let's say as the business owner) to see how old the books are that people order (going by their publication date).

  Explaining emp table does not have assigned primary key

Developers have noticed that EMP table doesn't have an assigned primary key. EMP_ID column has been selected to be the primary key.

  Summarize-data collection methods

Is the problem significant to nursing and health care? How will it generate or refine knowledge in nursing practice and Was the review of background literature provided?

  Case study queensland liquor national online trader

case study queensland liquor national online trader databasequeensland liquor national better known as qln owns an

  Draw relational schema and show functional dependencies

Draw relational schema and show functional dependencies Comprehensive schema that shows existing PK and all functional, partial and transitive dependencies Detailed schema that shows existing PK and most functional, partial and transitive dependen..

  Draw the uml and state diagram for an atm

Draw the UML and state diagram for an ATM

  Create the corresponding relational data model

Create the corresponding relational data model by implementing the database for myFlicks.com within the course's mySQL site, linked on the course's homepage within Blackboard. Be sure to populate your tables with dummy data, providing me with the..

  Write down advantage in storing metadata in tables

What is meant by a Metadata? How does this term pertain to a database? Write down advantage is there in storing metadata in tables?

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