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 would like to create an evironment variable that will output the current date. I have added the following to ~/.pam_environment:

TODAY=$(date +%F)

Apparently you have to log out after changing ~/.pam_environment. I did that but

echo $TODAY

outputs a blank line.

What am I doing wrong?

share|improve this question
add comment

1 Answer

You forgot the "quotes" Here is a Cool Link for more examples.

TODAY= date +"%F"
share|improve this answer
    
Unfortunately that did not work. I tried experimenting a bit and added the following to ~/.pam_environment: TODAY=date +"%F" TODAYS=$(date +"%F") NOW=$(date +"%m-%d-%Y") None of these are working –  Mark McKenna Apr 25 '13 at 1:32
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.