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

后端 未结 4 1185
予麋鹿
予麋鹿 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:21

    Looking at the function extract_colon_unit it seems to me that this is impossible. The : is unconditionally and inescapably used as the path separator.

    Well, this is valid at least for bash. Other shells may vary.

提交回复
热议问题