[Techtalk] BASH command subsitution

joe shindlin jojotheracoon at yahoo.com
Sun Sep 7 04:36:32 EST 2003


--- Robin Hood <RobinHood42 at clickta.com> 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'
> 
> should result in something like:
> 
> the date today is Mon Feb 2 00:41:55 CST 1998
> 
> However. When I type this into my Linux box (SuSE
> 8.0)
> All I get is:
> 
> todays date is date.
> 
> I have also tried the following:
> 
> $ echo 'ls'
> ls
> $ echo 'pwd'
> pwd
> 
> 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?
> 
> 
> *****A Network is the Opposite of a Hierachy*****
> 
> _______________________________________________
> Techtalk mailing list
> Techtalk at linuxchix.org
>
http://mailman.linuxchix.org/mailman/listinfo/techtalk


Hi robin,

don't forget to "weak quote" ("") the entire string.

#echo "today's date is `date`"

joe.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


More information about the Techtalk mailing list