I was messing around with a log4j properties file and accidently made a folder with the following text ${foo}
however I also have an environment variable named foo
that points to a folder so thus if I do rm -rf "${foo}"
it removes the folder $foo
is pointing to, instead of the folder ${foo}
. How can I specify to delete the folder in my current directory using a relative path instead of deleting the folder the environment variable points to?
Here is the layout to better help understand
$foo
= /home/user/bar
${foo}
= /home/user/${foo}
$foo
?$foo
is a folder calledbar
so if you entered$foo
and did tab complete it would come up as/home/user/bar
'${foo}'
?${foo}
, yep.