我刚刚在计算机上安装了 Cygwin。如果我输入,echo $PATH
我可以看到以下输出:
$ export $PATH
-bash: export: `/usr/local/bin:/usr/bin:/cygdrive/c/Program': not a valid identifier
-bash: export: `(x86)/NVIDIA': not a valid identifier
-bash: export: `Corporation/PhysX/Common:%CommonProgramFiles%/Microsoft': not a valid identifier
-bash: export: `Shared/Windows': not a valid identifier
-bash: export: `Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program': not a valid identifier
-bash: export: `Files/OpenVPN/bin:/cygdrive/c/Program': not a valid identifier
-bash: export: `(x86)/Git/cmd:/cygdrive/c/dev/java/apache-maven-3.2.3/bin:/cygdrive/c/programs/Java/jdk7/bin:/cygdrive/c/Users/edem/.lein/bin': not a valid identifier
看起来这里存在一些格式问题,但我说不上来。问题可能出在哪里?
答案1
您正在尝试导出价值PATH。只需导出变量:
export PATH
或者您只是想export
混淆echo
。