How to pass parameters to a Linux bash shell script function?

Like a bash script, a bash function also accepts positional arguments that can be accessed using $

Access function argument in Linux bash shell:

Access script and function arguments in Linux bash shell:

Leave a Reply