taskone, programming homework help
taskone, programming homework help
Description:
Write a shell script (to run on the Bourne shell) that can be used to remove some old C programs you no longer wish to keep.
When the script is run with no arguments supplied, it picks up each C program from the current directory and lists the first 10 lines (use the head command).
It then prompts for deletion of the file (the user can then choose to delete or not to delete the file). When the user supplies arguments (C program file names) with the script, it works on those files only.
Your script for this task must be named taskone.sh.
In designing your script you should consider the following scenarios:
- There is no C program file(s) stored under the current directory.
- There is at least one C program file stored under the current directory.
The user supplied arguments list contains names of existing C programs stored under the current directory. We can assume that all the C programs have been correctly named as *.c, and that there is no special character (such as space) in any of these filenames.
The user supplied arguments list contains both existing and missing names of C programs stored under the current directory. Missing names refer to the files which no longer exist under the current directory.
"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.
Discount Code: CIPD30
Click ORDER NOW..


