How to check if a variable is set in Bash
10:29 30 Aug 2010

How do I know if a variable is set in Bash?

For example, how do I check if the user gave the first parameter to a function?

function a {
    # if $1 is set ?
}
bash shell variables