variable assignments in script ${VAR1:=default}

ubu1404@ubuntu1404lb01:~$ echo ${a1:=default}
default
ubu1404@ubuntu1404lb01:~$ a1=val
ubu1404@ubuntu1404lb01:~$ echo ${a1:=default}
val
ubu1404@ubuntu1404lb01:~$ unset a1
ubu1404@ubuntu1404lb01:~$ echo ${a1:=default}
default
ubu1404@ubuntu1404lb01:~$

Comments

Popular posts from this blog

HAproxy logging

teamcity Automatic Agent Start under Linux

15 managing disk - understanding /etc/fstab xfs_admin mount -o rw,remount /