A minimal example of my problem is
$ dir='$HOME'
$ cd "$dir" # Not what I want
bash: cd: $HOME: No such file or directory
$ cd $HOME # Works
This is used in another script, where $HOME
is output from sed
. So I cannot just change dir to "$HOME"