subject

Have to use a bash Document all the shell work done to complete the assignment using the "screen –L" program or putty logging. This will keep a log of all your shell work. You will need to turn in the output files from "screen –L"/putty. See "Deliverables" below.
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 shuld 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: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:50, christinavelez26
Using least squares fitting, you are to fit the data sets to the following models and solve for the parameters ai , where i is the index of the parameter. the input/output data for the systems are linked in the bblearn site. for each of the systems use matlab to plot the supplied data vs. the model fit on one plot. include your code in the solutions. (a) linear fit "lineardata. mat" y=a1x^3 + a2x^2 + a3x + a4 (b) plant fit "plantdata. mat g(s) = a1/(s + a2)
Answers: 1
image
Computers and Technology, 22.06.2019 22:10, Metlife
Asequential circuit contains a register of four flip-flops. initially a binary number n (0000 ≤ n ≤ 1100) is stored in the flip-flops. after a single clock pulse is applied to the circuit, the register should contain n + 0011. in other words, the function of the sequential circuit is to add 3 to the contents of a 4-bit register. design and implement this circuit using j-k flip-flops.
Answers: 1
image
Computers and Technology, 23.06.2019 05:00, bellad0124outlookcom
In cell b18, enter a formula to calculate the amount budgeted for meals. this amount is based on the daily meal allowance and the total travel days (# of nights+1).
Answers: 1
image
Computers and Technology, 23.06.2019 21:30, mariah10455
Write a fragment of code that reads in strings from standard input, until end-of-file and prints to standard output the largest value. you may assume there is at least one value. (cascading/streaming logic, basic string processing)
Answers: 3
You know the right answer?
Have to use a bash Document all the shell work done to complete the assignment using the "screen –L...

Questions in other subjects:

Konu
Mathematics, 29.07.2019 13:50