Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm reading Unix Programming Environment.There is a sample program

echo "time is 'date'"

with output as

time is {current time}

But in ubuntu's bash shell it is not giving output as expected.It prints whole line as it is

 time is 'date'

Why is that? and Is it okay to read outdated book to learn Linux OS?

share|improve this question
You might consider migrating this question to or – Andrew Case Sep 24 '11 at 16:32
up vote 3 down vote accepted

You want to use the following instead:

echo "time is `date`"

` (backtick) instead of ' (apostrophe)

The Unix/Linux foundation is the same, but a lot of utilities change over time so their options differ widely over time. Even between flavors they differ. So an older book is usually fine as most things will still work and are still accurate. A newer book would give you better use of newer features that didn't exist in the old days.

share|improve this answer
Thank you very much. – Furqan Sep 24 '11 at 16:31

You can also use echo "time is $(date)" to avoid confusing single quote with backstick.

share|improve this answer

Your Answer


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.