subject

Need help with Linux homework! Please take screenshots if you can. With console logging enabled, write a program that consists of two C++ source files. The first file contains the main() routine and the second file contains a C++ procedure. From within main(), you must display the count of command line arguments to stdout. Further, you must display the value of each command line argument to stdout. Finally, you must call the procedure that is defined in the second file. From within the procedure defined in the second file, you must display a log message that states you are inside the procedure. This log message must be sent to stderr.

You are then to create a shell script for compiling your code. The script will individually compile each file and generate the intermediate object file. Once the object files are created, the script will call the linker and link the object files into an executable. Your shell script should echo what it is doing at each step to stdout.

You are then to create a second shell script that will run your program several times with varying command line arguments. Each time you call your program, you should append the stdout to an output file called stdout. log and you should append the stderr to an output file called stderr. log. Your shell script should echo what it is doing at each step to stdout.

Example Output
$> compile. sh
Setting TEMPDIR environment variable to /scratch

Compiling file1.cc

Compiling file12.cc Linking files to create executable hw1

Done

$> run. sh
Running 'hw1' with 0 arguments:

stdout appended to stdout. txt

stderr appended to stderr. txt
Running 'hw1' with 1 argument:

stdout appended to stdout. txt

stderr appended to stderr. txt
Running 'hw1' with 5 arguments:

stdout appended to stdout. txt

stderr appended to stderr. txt

$> more stdout. txt
argc was: 1

./hw1

Done!

argc was: 2

./hw1

abc

Done!

argc was: 6

./hw1

a

b

c

d

e

Done!

$> more stderr. txt
Inside proc1() as stderr

Inside proc1() as stderr

Inside proc1() as stderr

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 10:30
How would you categorize the software that runs on mobile devices? break down these apps into at least three basic categories and give an example of each.
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Jace needs to answer a question on square roots to win a quiz. how can he use a spreadsheet to find the square root of 786? a. use the functions round and count b. create a table and chart c. use the function sqrt d. use the function now
Answers: 3
question
Computers and Technology, 23.06.2019 16:00
Which analyst position analyzes information using mathematical models to business managers make decisions?
Answers: 1
question
Computers and Technology, 24.06.2019 02:30
Which option completes the explanation for conflict of interest in an organization
Answers: 1
You know the right answer?
Need help with Linux homework! Please take screenshots if you can. With console logging enabled, wr...
Questions
question
Mathematics, 24.11.2020 20:30
question
Mathematics, 24.11.2020 20:30
Questions on the website: 13722360