bash - How to escape hyphen(-) in shell script? -


this question has answer here:

my bash script keeps failing because gets confused @ hyphen:

if [ ! -d "$openssl-1.0.1i"]; ... 

how escape correctly?

it's not hyphen, must leave space surrounding each argument in test construct:

if [ ! -d "$openssl-1.0.1i" ]; .. 

why have $ before openssl? it's not variable it? if not, should just:

if [ ! -d "openssl-1.0.1i" ]; .. 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -