如何用圆点设置环境?


11

我尝试使用export并设置env来做到这一点,但是没有用。怎么做?

例如

~/directory$ export a.home=1 
bash: export: `a.home=1': not a valid identifier

Answers:


11

该点在外壳标识符中不是有效字符。
因此答案是“您不能做您想做的事”:

   name   A word consisting only of  alphanumeric  characters  and  under-
          scores,  and beginning with an alphabetic character or an under-
          score.  Also referred to as an identifier.

您可以按照以下@Amos的帖子
特伦特(Trent)

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.