First its not like this question How do I echo a string with multiple spaces in bash “untouched”? [duplicate] because in that question he just want to print it and I want to assign it to variable and save it. I've tried this:
SPACE=' '
VAR="$VAR1${SPACE}$VAR2"
http_proxy? – Stephen Kitt Dec 03 '16 at 15:35env. The variablehttp_proxyis not part of a bash shell. Variables likePATH,HOME,PWD, etc are. – Valentin Bajrami Dec 03 '16 at 15:42env | grep proxyand see what comes out... – Stephen Kitt Dec 03 '16 at 15:46By convention, environment variables (PATH, EDITOR, SHELL, ...) and internal shell variables (BASH_VERSION, RANDOM, ...) are fully capitalized. All other variable names should be lowercase. Since variable names are case-sensitive, this convention avoids accidentally overriding environmental and internal variables.– Valentin Bajrami Dec 03 '16 at 15:55HOMEor more importantly you'll use a var calledPATHwhich will point to a directory. This causes not only confusion but poses unexpected results as well. A nice reading about it is here: http://mywiki.wooledge.org/Environment – Valentin Bajrami Dec 03 '16 at 16:09