I am trying to figure out how to setup a script that will do the following:
files in dir:
a_3.txt
b_3.txt
c_3.txt
script(s) in dir:
1.sh # run this for a_*.txt
2.sh # run this for b_*.txt or c_*.txt
I need to have a function that will select the file and run it through a specified script.
fname = "c_*.txt" then
if "${fname}" = "c_*.txt"
./1.sh ${fname} [param1] [param2]
fi
or some sorts. the script will be in the same location as the files/scripts it will utilize. in words, the script will run a specified script based on the start of the file name and the filetype/suffix. any help would be appreciated.