Bad : modifier in $ (.)

后端 未结 3 1964
我在风中等你
我在风中等你 2021-02-07 04:26

I want to set environment variable in linux and did the same by giving command

 export PATH=$PATH:.

But getting error Bad : modifier in $ (.).<

3条回答
  •  春和景丽
    2021-02-07 05:02

    Bad : modifier in $ (.).
    

    This is not a Bash error, nor is it from Ksh: it's from C-shell or one of its clones such as Tcsh.

    You want:

    setenv PATH ${PATH}:.
    

    But you should not put . in your ${PATH}, it's a well-known security risk.

提交回复
热议问题