home directory expansion (~) within an argument home directory expansion (~) within an argument bash bash

home directory expansion (~) within an argument


While ~ does not expand (it's used as specially routed of the path), $HOME does.

rdesktop -r disk:bacon=$HOME/bacon host

But be careful with environment-changing su!


rdesktop -r disk:bacon=$(echo ~/bacon) host

will do it. It won't please the eye, but it will work.