Question
Shell Scripts First, write a makefile for compiling the C source code files provided for the project (please see my web page given above). The
Shell Scripts
First, write a makefile for compiling the C source code files provided for the project (please see my web page given above). The generated executable should be named as cal.exe.
Note that you may face problems with the compilation of the code (the code is correct) and you need to figure out how to solve them. The code is correct and there is no need to change anything. When you compile each C source code file separately (you are required to do so in your makefile), you need to use proper options for gcc (or cc) to avoid complaints about undefined variables. Also, you need to figure out what other parts shall be included in the compilation command to properly compile the code without getting error messages.
Next, write a shell script exec.sh to compile the program using the make command and execute cal.exe with provided input file cal.in. In script exec.sh, you need to capture the output from cal.exe and print it to a file with name . In other words, your script needs to take as an input argument. Your shell script will need to execute cal.exe twice. In the second execution, you
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started