I'm currently working on an assignment where I have a script that is basically just getting to learn using grep with different regex's.
I have the script written except for the first part where I am asked to take a file as input and then the script runs based on that file.
I have the prompt for input, the read command after, the grep commands. Everything works fine, I just need to implement an if statement I believe that would run the script if it only has 1 parameter given. - The assignment says that the script should only run if 1 and only 1 parameter is given otherwise it should display an error message.
Thanks,