# Run the script with the arguments as you would for
# every other command.
# Example: ./script.sh arg1 arg2
#!/bin/sh
echo "argument1: $1"
echo "argument2: $2"
# Output:
# argument1: arg1
# argument2: arg2
makereport -u jsmith -p notebooks -d 10-20-2011 -f pdf
#!/bin/bash
while getopts u:d:p:f: option
do
case "${option}"
in
u) USER=${OPTARG};;
d) DATE=${OPTARG};;
p) PRODUCT=${OPTARG};;
f) FORMAT=${OPTARG};;
esac
done