parameterized function in shell script