From owner-freebsd-questions Wed Mar 8 15:32:30 2000 Delivered-To: freebsd-questions@freebsd.org Received: from nscache2.x-treme.gr (mail1.x-treme.gr [212.120.196.23]) by hub.freebsd.org (Postfix) with ESMTP id EFE8437B5F3 for ; Wed, 8 Mar 2000 15:32:20 -0800 (PST) (envelope-from keramida@ceid.upatras.gr) Received: from hades.hell.gr (pat34.x-treme.gr [212.120.197.226]) by nscache2.x-treme.gr (8.9.3/8.9.3/IPNG-ADV-ANTISPAM-0.1) with SMTP id BAA00328 for ; Thu, 9 Mar 2000 01:32:08 +0200 Received: (qmail 3484 invoked by uid 1001); 8 Mar 2000 15:19:54 -0000 Date: Wed, 8 Mar 2000 17:19:54 +0200 From: Giorgos Keramidas To: courtney@whtz.com Cc: questions@FREEBSD.ORG Subject: Re: using date for file names Message-ID: <20000308171953.D2947@hades.hell.gr> Reply-To: keramida@ceid.upatras.gr References: <85256899.0062DDEE.00@mail.whtz.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <85256899.0062DDEE.00@mail.whtz.com>; from courtney@whtz.com on Sun, Mar 05, 2000 at 12:59:51PM -0500 X-PGP-Fingerprint: 62 45 D1 C9 26 F9 95 06 D6 21 2A C8 8C 16 C0 8E X-Phone-Number: +30-94-6203692, +30-93-2886457 X-Address: Theodorou Kirinaiou 61, 26334 Patra, Greece Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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