[Techtalk] BASH command subsitution

Jacinta Richardson jarich at perltraining.com.au
Sun Sep 7 18:14:48 EST 2003


On Sun, 7 Sep 2003, Robin Hood wrote:

> I have been working through my Unix textbook and am up to the chapter on the
> Bourne shell.
> I am up to the section on command subsitution.

> According to my textbook typing:
> 
> $ echo the date today is 'date'
> 
> It seems that command subsitution does not work under bash (at least on my
> computer anyway).
> Has anybody else ever had this problem?
> Is it a bug? or am I doing something really stupid?

The most obvious error is that you might be using apostrophes ' there
instead of backticks `.  Try using backticks and see if that fixes the
problems.  

(In bash apostrophes are just quoting characters.  Backticks say, evaluate
this first and then I'll work with the result.)

If that's not it, we'll have to come up with another thory.

all the best,

	Jacinta

--
   ("`-''-/").___..--''"`-._          |  Jacinta Richardson         |
    `6_ 6  )   `-.  (     ).`-.__.`)  |  Perl Training Australia    |
    (_Y_.)'  ._   )  `._ `. ``-..-'   |      +613 9354 6001         |  
  _..`--'_..-_/  /--'_.' ,'           | contact at perltraining.com.au |
(il),-''  (li),'  ((!.-'              |   www.perltraining.com.au   |



More information about the Techtalk mailing list