Help needed with shell script

Hi,
I have trouble building the logic for the following, could anyone please help me out with this:

Im working on a wrapper script to check for input files (in a specific directory) and pass
the input files along with the options as parameters to the main script.The options vary depending
on the input file.
If the input file is input.txt, the option is -i
If the input file is multi.csv, the option is -m
If the input file is comp.csv, the option is -c
If the input file is data.txt, the option is -d
If the input file is value.tsv, the option is -v

NOTE:
a) The input files can be of any format like .txt, .csv, .tsv (but the filenames are standard as mentioned above)
b) There can be any number of files in a directory. The script has to check the number of files,
type of files available and based on the type of input files it has to determine the option.

Ex: <main-script> -i input.txt -m multi.csv -c comp.csv -d data.txt -v value.tsv

Please let me know if you need any more information!!!

Thank You all!!!

Have a look at getopts

Hi Scrutinizer,
Thanks for the response.
I guess i cant use getopts in my case as i need to determine the options based on the input files provided. Please correct me if im wrong.

Thanks!!