Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Mar 2000 17:19:54 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        courtney@whtz.com
Cc:        questions@FREEBSD.ORG
Subject:   Re: using date for file names
Message-ID:  <20000308171953.D2947@hades.hell.gr>
In-Reply-To: <85256899.0062DDEE.00@mail.whtz.com>; from courtney@whtz.com on Sun, Mar 05, 2000 at 12:59:51PM -0500
References:  <85256899.0062DDEE.00@mail.whtz.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Mar 05, 2000 at 12:59:51PM -0500, courtney@whtz.com wrote:
> 
> 
> when I do mv original.txt `date +%m%d%y`.doc i get a file that is named
> "date +%d%m%y.doc"
> 
> any ideas??

I sure hope you're not using a shell which tries to interpret %
characters as some form of escape char, or anything...

Try using this:

	% mv original `date '+%m%d%y'`.doc

Watch the use of single and backquotes.  It is important to know that
the string between `...` (the backquotes) is interpreted by the shell
as a command.  If the shell gives special meaning to % characters, you
might end up with some unpleasant surprise :)

-- 
Giorgos Keramidas, < keramida @ ceid . upatras . gr >
For my public PGP key: finger keramida@diogenis.ceid.upatras.gr
PGP fingerprint, phone and address in the headers of this message.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000308171953.D2947>