Write a BASH script that uses AWK and SED programs that you created for Task 1 and Task 2 of this assignment.

Write a BASH script that uses AWK and SED programs that you created for Task 1 and Task 2 of this assignment. For this task, create only a file with your BASH script (i.e., As5_yourName.sh). Your script should:

1.Run the AWK program that you wrote as your response to Task 1 above with salary_file.txt as the input to it (you can assume that salary_file.txt is located in the same working directory in which are your .awk and .sh files)

2.Ask a user to input a text file name with a text in it (use read command not a positional parameter).

3.Check if the user enters a valid file name a)check if a file exists b)check if a file is readable c)check if the file has extension .txt 4.If the text file exists, a)print to a screen/terminal message that validations in steps 3.a)-3.c) passed b)run the SED program that you wrote as your response to Task 2 above with the file that the user entered in 1. above c)exit your script with success (i.e., use exit 0 command) 5.If the text file does not satisfy validations of 2.a)-2.c) above a)print to a screen/terminal appropriate feedback to the user b)exit your script with failure (i.e., use exit 1 command)

You should test your script by running it with your program written for Problem 1 of this assignment

Write a BASH script that uses AWK and SED programs that you created for Task 1 and Task 2 of this assignment.
Scroll to top