도트로 env를 설정하는 방법은 무엇입니까?


11

export와 set env로 시도했지만 작동하지 않았습니다. 어떻게합니까?

예를 들어

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

답변:


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의 게시물에 따라 마침표로 var 이름을 설정할 수 있습니다
Trent

21

실제로 동료가 방금 요청한 후 해결 방법을 찾았습니다.

env var.with.dots=value command

이전 답변과 마찬가지로이 답변이 훨씬 유용합니다.
kboom
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.