Question: Write a BASH script that uses AWK program. Your script should: 1. Ask a user to input a file name with AWK program (use read

Write a BASH script that uses AWK program. Your script should:

1. Ask a user to input a file name with AWK program (use read command not positional parameter) .

2. Check if the user enter a valid file name

a) check if a file exist

b) check if a file is executable

c) check if the file has extension awk (i.e., .awk)

3. If a file with AWK program exists,

a) print to a screen/terminal message that validation was successful

b) run it from within your script

4. If a file with AWK program does not satisfy any of 2.a.-2.c

a) print to a screen/terminal appropriate feedback to the user

b) exit/terminate your script with error

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!