How to escape colon (:) in $PATH on UNIX?

后端 未结 4 1174
予麋鹿
予麋鹿 2020-12-08 09:21

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 te

4条回答
  •  爱一瞬间的悲伤
    2020-12-08 10:11

    According to http://tldp.org/LDP/abs/html/special-chars.html single quotes should preserve all special characters, so without trying it, I would think that '/bin:d' would work (with)in $PATH.

提交回复
热议问题