Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ UNIX SYSTEM CALL I have a problem with a Unix System call in cpp, I need help correcting this issue. We are using the

C++ UNIX SYSTEM CALL

I have a problem with a Unix System call in cpp, I need help correcting this issue. We are using the VI editor.

2. Move into the directory playarea. You are going to create file 'foxes' here.

my code:

system("echo 'Move into the directory play area: '; cd playarea"); system("echo 'List the files in the playarea directory: '; ls"); system("echo 'The only winning move is not to play.' > foxes"); system("echo 'The only winning move is not to play.'; vi foxes << EndOfCommands i THE QUICK BROWN FOX has 3 brother foxes and 4 sister foxes. BUT she is the slowest of all. ^[ ZZ EndOfCommands");

a) List the files in the playarea directory.

b) Remove files 'foxes' and 'wolves' from the directory.

c) Create the file foxes by input redirection, so that it will contain the following lines:

THE QUICK BROWN FOX has 3 brother foxes and 4 sister foxes. BUT she is the slowest of all.

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

Students also viewed these Databases questions