What is the most elegant way to remove a path from the $PATH variable in Bash? My dirty hack: echo ${PATH} > t1 vi t1 export PATH=$(cat t1)