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

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

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