I need to parse the $PATH
environment variable in my application.
So I was wondering what escape characters would be valid in $PATH
.
I created a test directory called /bin:d
and created a test script called funny
inside it. It runs if I call it with an absolute path.
I just can't figure out how to escape :
in $PATH
I tried escaping the colon with \
and wrapping it into single '
and double "
quotes. But always when I run which funny
it can't find it.
I'm running CentOS 6.