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

  Create a database for a home-budgeting application

The first part is to create a database and some tables which will be appropriate for a home-budgeting application. That portion of the assignment should be completed from the MySQL console command line.

  Companys traditional costing system-pacchiana manufacturing

Unit product cost of product R21V under the company's traditional costing system - unit product cost of product D00B under the activity-based costing system is closest

  Draw a complete entity relationship model

Discuss any FOUR reports that would be generated from the data model - Draw a complete Entity Relationship (ER) model using data model notation that you are familiar.

  Create a new table named sportinggoods in database

Create a new table named SportingGoods to contain the columns PartNum, Description, OhHand, Warehouse, and Priced for all rows in which the item class is SG.

  Find the sids of suppliers who supply every part

Find the sids of suppliers who supply every part. Find the sids of suppliers who supply every red part. Find the sids of suppliers who supply every red or green part.

  Question 1 the systems analyst proposes the subsequent two

question 1. the systems analyst proposes the subsequent two relationships between the flight and pilot entities what

  How to use spool command

How to interactively query a database by using SQL statements and SQL*PLUS commands and how to use spool command to save an interactive session within SQL*PLUS.

  Create a simple query for each table that returns

Create a simple query for each table that returns all of the columns and all of the rows for each table. Write a query that displays each part that has been purchased by Huffman Trucking Company

  Draw a fully-labeled erd that includes entities

Draw a fully-labeled ERD that includes entities, labeled relationships (indicate whether each relationship is mandatory or optional), primary keys, foreign keys, and cardinalities. Follow the format (Crow's Foot notation) and naming conventions.

  Compose conceptual data modeling techniques

Explain the fundamentals of how data is physically stored and accessed and compose conceptual data modeling techniques that capture information requirements - design a relational database so that it is at least in 3NF.

  Explaining views for protecting access by unauthorized users

Why do you believe that views by themselves are insufficient for protecting access by unauthorized users?

  Build relatively well normalized relational database

If we added hats in 3 sizes and 3 colors and 3 styles, discuss briefly how many additional tables you 'uld add to the design.

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