Write a Bash script that defines a recursive function named `factorial` which calculates the factorial of a given number. The function should take a single parameter (the number) and return its factorial. Call the function and print the result for the number 5.