Bash script what is := for?

From Bash Reference Manual:

${parameter:=word}

If parameter is unset or null, the expansion of word is assigned to
parameter. The value of parameter is
then substituted. Positional
parameters and special parameters may
not be assigned to in this way.

Basically it will assign the value of word to parameter if and only if parameter is unset or null.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)