The Problem: Read the name of a C file with full path, move it to a newly created folder named “c” under the home directory, change the working directory to this directory, rename the file by appending current date, compile the program and save the compilation result in a file named “cc_cfilename_date”. If compilation is successful, display the message “run your program” on the screen otherwise, display the message “check compilation results in the file ‘cc_cfilename’” Code a solution for the problem given above using either one of the following two option. 1. Using C programming under Linux with system calls. You are not allowed to use the “system()” C function. 2. Using batch scripting under Linux
The Problem: Read the name of a C file with full path, move it to a newly created folder named “c” under the home directory, change the working directory to this directory, rename the file by appending current date, compile the program and save the compilation result in a file named “cc_cfilename_date”. If compilation is successful, display the message “run your program” on the screen otherwise, display the message “check compilation results in the file ‘cc_cfilename’” Code a solution for the problem given above using either one of the following two option. 1. Using C programming under Linux with system calls. You are not allowed to use the “system()” C function. 2. Using batch scripting under Linux
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section8.1: I/o File Stream Objects And Functions
Problem 10E
Related questions
Question
The Problem:
Read the name of a C file with full path, move it to a newly created folder named “c” under the home directory, change the working directory to this directory, rename the file by appending current date, compile the program and save the compilation result in a file named “cc_cfilename_date”. If compilation is successful, display the message “run your program” on the screen otherwise, display the message “check compilation results in the file ‘cc_cfilename’”
Code a solution for the problem given above using either one of the following two option.
1. Using C
2. Using batch scripting under Linux
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,