Home How to check if a variable is set in Bash?
Reply: 0

How to check if a variable is set in Bash?

user211
1#
user211 Published in May 21, 2018, 6:39 pm

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 ?
}
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.535204 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO