People who invoke your script with no arguments will be surprised if they get told 'too many arguments'. If you expect exactly two arguments, the message should probably be something like echo "Usage: $0 from to" >&2 which identifies the command (via $0), and the correct usage, and sends the information to standard error (so it doesn't get lost in a pipeline, for example). Most of my scripts use $(basename $0 .sh) to identify the command being run.
echo "Usage: $0 from to" >&2which identifies the command (via$0), and the correct usage, and sends the information to standard error (so it doesn't get lost in a pipeline, for example). Most of my scripts use$(basename $0 .sh)to identify the command being run.