I tried doing that with export and set env, but it did not work. how to do it?

for example

~/directory$ export a.home=1 
bash: export: `a.home=1': not a valid identifier
up vote 8 down vote accepted

The dot is not a valid character in a shell identifier.
So the answer is "you cannot do what you ask":

   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.
  • You can set var names with periods as per @Amos 's post below – Taras Mar 25 '14 at 6:26

Actually a colleague just asked me and I found a work-around - use

env var.with.dots=value command
  • As accurate as the previous answer is, this one is much more useful. – kboom Jan 10 '17 at 21:58

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.