Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write shell script named taska that accepts two arguments. The first argument will be the number corresponding to each of the following sub-tasks. The use
Write shell script named taska that accepts two arguments. The first argument will be the number corresponding to each of the following sub-tasks. The use of the second argument, which we refer to as INPUT, will be described in the following sub- tasks: 1. List the files in the INPUT folder where the filenames contain one (and only one) hyphen () You can use command find for this purpose 2. Find and print lines in INPUT file which have bad punctuation: a space character (e.g., space or tab) before dot (.) or comma (,) punctuation marks. For example, your script should detect "text, and ignore "text." You can use command grep for this purpose. The following is an example of running your command to perform first sub-task /task4 1 /usr/bin Your script must test the arguments and send appropriate error message to stderr if arguments are not as expected (for example: not a valid directory for sub-task 1) Test task4 script extensively, and include it in your repository
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