You should add quotes and also, your function declaration is wrong.
myFunction()
{
echo "$1"
echo "$2"
echo "$3"
}
And like the others, it works for me as well.
More Related Contents:
- Passing parameters to a Bash function
- Return value in a Bash function
- How to pass all arguments passed to my bash script to a function of mine? [duplicate]
- Difference between return and exit in Bash functions
- Using getopts inside a Bash function
- How to determine function name from inside a function
- Is the behavior behind the Shellshock vulnerability in Bash documented or at all intentional?
- Execute a shell function with timeout
- Forward function declarations in a Bash or a Shell script?
- How to effectively abort the execution of a Bash script from a function
- Determine if a function exists in bash
- How can I execute a bash function using sudo?
- What is the proper way to test a Bash function’s return value?
- How can I check if a program exists from a Bash script?
- How can I compare numbers in Bash?
- echo “#!” fails — “event not found”
- Pipe output and capture exit status in Bash
- Which characters need to be escaped when using Bash?
- Shell redirection i/o order
- Loop through all the files with a specific extension
- How to apply shell command to each line of a command output?
- What do double-asterisk (**) wildcards mean?
- How to split strings over multiple lines in Bash?
- Creating a string variable name from the value of another string
- Passing arguments by reference
- How to limit number of threads/sub-processes used in a function in bash
- How do I remove all .pyc files from a project?
- Sorting strings with numbers in Bash [duplicate]
- What does the double-asterisk (**) wildcard mean?
- How to send control+c from a bash script?