Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
share|improve this question
add comment

2 Answers

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

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

env var.with.dots=value command
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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