2013-02-07 33 views

回答

0
#this will set var value with some/path, 
#no matter var is empty or not (overwrite) 
var='some/path' 


# this will set value of var to "some/path" 
#only if var is empty/or not declared yet. 
var=${var:-"some/path"} 
0
var='some/path' 

将始终设置VAR一些/路径

var=${var:-"some/path"} 

将只设置VAR到VAR如果如果尚未设置一些/路径。如果设置,它的值不会改变。