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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -