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

1111. appearing after print sequence - php -

excel - I can't get the attachement of the email PHP -

node.js - Express and Redis - If session exists for this user, don't allow access -