Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CPP Unix System calls questions Need help completing the last part of this problem d-p chdir(playarea); system(echo 'List the files in the playarea directory: ';

CPP Unix System calls questions

Need help completing the last part of this problem d-p

chdir("playarea"); system("echo 'List the files in the playarea directory: '; ls"); system("echo 'Remove files 'foxes' and 'wolves' from the directory'; rm -f foxes wolves"); system("echo -e 'THE QUICK BROWN FOX has 3 brother foxes and 4 sister foxes. BUT she is the slowest of all' > foxes"); /* d) List the files in the playarea directory, and display the contents of file foxes. e). Make a copy of 'foxes' called 'foxes_saved'.

f) List the files in the playarea directory.

g) Use sed to edit file foxes, replacing the word 'foxes' with 'wolves'. Output should be displayed on standard output/screen.

h) Perform a command that pipes the result from (g) into a sed command to replace the phrase 'BROWN FOX' with 'GRAY WOLF'. Output should be displayed on standard output/screen.

i) Perform the command from (h) and redirect output a file named 'wolves'.

j) Append the line "END OF WOLF PACK' to the end of file 'wolves'.

k) Copy the file wolves into your home directory.

l) Move to your home directory, an list the files in your home directory.

m) Read in a file name from the keyboard.

n) Display the name entered in the keyboard as "NEW FILE NAME = xxxxxxx"

o) Copy the file wolves into that file.

p) List the files in your home, and display the contents of the newly created file. */

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is quality of work life ?

Answered: 1 week ago

Question

What is meant by Career Planning and development ?

Answered: 1 week ago

Question

What are Fringe Benefits ? List out some.

Answered: 1 week ago