Date: Wed, 17 Apr 2002 16:43:58 +0200 From: Stijn Hoop <stijn@win.tue.nl> To: "G. Jason Middleton" <gmiddl1@umbc.edu> Cc: Questions list <freebsd-questions@freebsd.org> Subject: Re: touching a file with todays date Message-ID: <20020417164358.G57300@pcwin002.win.tue.nl> In-Reply-To: <Pine.SGI.4.31L.02.0204171034560.10093171-100000@irix2.gl.umbc.edu>; from gmiddl1@umbc.edu on Wed, Apr 17, 2002 at 10:36:50AM -0400 References: <Pine.SGI.4.31L.02.0204171034560.10093171-100000@irix2.gl.umbc.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 17, 2002 at 10:36:50AM -0400, G. Jason Middleton wrote: > Does anyone know how to create a file using the date of the particular > day? >=20 > For example, >=20 >=20 > touch "`date +%D'" >=20 > one would think that this woul create a file called 04/17/02 >=20 >=20 > However this does not work. No, because the '/' is the directory separator, and your last quote should be a backquote instead of a regular one. Try this: touch "`date +%Y-%m-%d`" which creates a file called 2002-04-17 (in my timezone). HTH, --Stijn --=20 "Coca-Cola is solely responsible for ensuring that people - too stupid to k= now not to tip half-ton machines on themselves - are safe. Forget parenting - t= he blame is entirely on the corporation for designing machines that look so innocent and yet are so deadly." -- http://www.kuro5hin.org/?op=3Ddisplaystory;sid=3D2001/10/28/212418/42 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?20020417164358.G57300>