I think there are many many examples of code here that take an input argument and use that argument in the script.
You need to search more
If you can't find it (maybe you are not good at keyword searches), you can search the net for a bash tutorial and at least attempt to write this very trivial script yourself first.
Then, post what you have written and folks will help you.