I shell scripts I see compares always written this way:
if [ "$?" -eq 0 ] then ...
What the purpose of the double-quotes around the variable?
If I remove the quotes then it doesn't seem to have an effect. Is it for preventing something?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community