Bash: how to test whether a variable is set?
Jump to:
| Project: | Linux software | 
| Component: | Documentation | 
| Category: | support request | 
| Priority: | normal | 
| Assigned: | Unassigned | 
| Status: | closed | 
| Related pages: | #5382: Bash: validating variables and parameters | 
| Tags: | bash script | 
Description
Bash: how to test whether a variable is set?
For example, in a bash script, ${1} stands for the first argument the script was called with. However, ${1} might not be set.
How to test this?
Comments
#1
#2
Automatically closed -- issue fixed for 2 weeks with no activity.