syntax for assigning values to a variable
Posted on 2008-06-24
very simple question, in a KornShell script, I want to assign a value to a variable, do I use single quote, double-quote, or what? What is the rule?
these two work, so no quotes at all
trace_flag=FALSE - is this the boolean FALSE (aka reserved word), so it doesn't need quotes?
PLAN_TYPE=mapd - does this need quotes?
USER_FRIENDLY_PGM=MA-PD - does this need quotes, oftentimes the dash causes hiccups
USER_FRIENDLY_PGM=Med D - seems like this needs quotes since there is a space