All Posts

How to check if a variable is set in Bash?

Question Answers Short Approach Full explanation Question For example, how do I check if the user gave the first parameter to a function? function a { # if $1 is set ?