This may seem pretty hilarious, but why did this happen? In the first line I was appending an existing local user variable, and in the second line I get a continuation prompt (it looks the same with a different color in my terminal). Why the continuation prompt? How do I exit this expression properly? And how would you properly append a variable with the output of a command? pwd >> $joe doesn’t work.
rcharette station-2-87 ~ $ joe=$joe\`pwd`
rcharette station-2-87 ~ $
rcharette station-2-87 ~ $ ;
rcharette station-2-87 ~ $
rcharette station-2-87 ~ $
rcharette station-2-87 ~ $ ^[
-bash: :s^[: substitution failed
rcharette station-2-87 ~ $
rcharette station-2-87 ~ $ exit
rcharette station-2-87 ~ $ ,
rcharette station-2-87 ~ $
rcharette station-2-87 ~ $
rcharette station-2-87 ~ $ exit
rcharette station-2-87 ~ $ ls
rcharette station-2-87 ~ $
The escape char (backslash ) causes the next char to be interpreted as a literal. So the \ before the ‘ on the first line causes the ‘ to be treated as a literal instead of, well, and open quote. Therefore the second ‘ is actually the open quote and everything after that is treated as a literal string.
Why did you add the backslash? Just remove it and it should work.
Barry