Trouble defining an environment variable on Cygwin

5

I'm using the Cygwin 64-bit installation on my Windows 7 machine. In my ~/.bash_profile, I set

export JBOSS_HOME=/cygdrive/c/Program\ Files/wildfly-10.0.0.CR2/

However, when I attempt to open a file using the $JBOSS_HOME environment variable,

$ vi $JBOSS_HOME/standalone/configuration/standalone.xml

The file doesn't open properly and instead attempts to open two files in vi, one of which is

"/cygdrive/c/Program" [New File]

What is the proper way to define my environment variable so that I can use it when opening it again in vi?

Dave

Posted 2015-10-12T20:45:12.553

Reputation: 51

Answers

2

Use double-quotes to send the entire string as one parameter.

$ vi "$JBOSS_HOME/standalone/configuration/standalone.xml"

Steven

Posted 2015-10-12T20:45:12.553

Reputation: 24 804