Find any files that match this name template

Linux / bash / vim

Make a script zad3.sh that will search through the directory given as the first parameter and find any files that match this name template:

GPS_HH_MM_SS_yyyy.log , where:
yyyy - any number of any characters, but not less than four
HH - hour
MM - minute - given as the second parameter
SS - seconds

The script will print to standard output:
<name of the directory>:<given minute>:<number of found files>:<space-separated list of yyyy string values>

If the second and first or second parameter was not given then the script will write a message to standard error output and end with a return value of 1

If the first parameter is not a directory then the script will write a message to standard error output and end with a return value of 2

Hi Sway,

This looks a lot like coursework... if so, we have a dedicated homwwork forum: Homework & Coursework Questions - Unix Linux Community

You could also include details on such as the language are using and what you have you done so far.

2 Likes

I suggest you start with the parameter checking.
Then think about a loop over the wanted files.
We are happy to help with specific issues.