Positional parameters refer to the script's arguments in the main level of the script, but to function arguments in function body. So
print_something Something
would actually print Something.
If you want to pass scriptthe script's arguments to a function, you canmust do that explicitly:. Use
print_something "$1"
to pass the first argument, or
print_something "$@"
to pass all of them, though the function in example only uses the first one.