[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VARs

From: Larry Jones
Subject: Re: VARs
Date: Wed, 16 May 2001 11:03:48 -0400 (EDT)

Andy Lewis writes:
> My question, am I not allowed to do the following?
>    cvs commit -m "Changed initial value of $my_var"
> I would like $my_var to print out as is.

This has nothing whatsoever to do with CVS, it's a shell question.  The
shell substitutes environment variables inside double quoted strings, so
if you want something that looks like a variable substitution literally
instead, you either have to escape the $:

        cvs commit -m "Changed initial value of \$my_var"

or use single quotes instead:

        cvs commit -m 'Changed initial value of $my_var'

-Larry Jones

Nobody knows how to pamper like a Mom. -- Calvin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]