I have a bash script that uses $1 to process a command line argument.
I want to modify this script to work even when a command line argument isn't given; in that case I want the script to use a default value.
I don't know how to do this; basically I figure I need to replace $1 with my own variable and have a line at the start of the program that checks whether a value was passed for $1, and if not to use the default that I'll provide. But I don't know the syntax for that. Can anyone help me?