From owner-freebsd-questions Sun Jun 14 09:57:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA26550 for freebsd-questions-outgoing; Sun, 14 Jun 1998 09:57:35 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from ralf.serv.net (ralf.serv.net [205.153.153.77]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA26545 for ; Sun, 14 Jun 1998 09:57:26 -0700 (PDT) (envelope-from mcglk@ralf.serv.net) Received: (from mcglk@localhost) by ralf.serv.net (8.8.5/8.8.5) id JAA24308; Sun, 14 Jun 1998 09:58:03 -0700 (PDT) Date: Sun, 14 Jun 1998 09:58:03 -0700 (PDT) Message-Id: <199806141658.JAA24308@ralf.serv.net> From: Ken McGlothlen MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: questions@FreeBSD.ORG Subject: Re: Unix commands X-Mailer: VM 6.33 under Emacs 19.34.1 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG drifter@stratos.net (drifter@stratos.net) writes: | On Sat, Jun 13, 1998 at 09:04:59AM -0500, Dave Bender wrote: | > One solution would be: | > | > $ date | awk '{print "mv yourfile $2.html"}' | sh | > [...] | | How about: | | $ mv yourfile `date | awk '{print $2$3-$4.html}'` | | or alternatively: | | $ mv yourfile $(date | awk '{print $2$3-$4.html}') | [...] You know, the FreeBSD date command does support a strftime capability, so it might be more straightforward to write mv yourfile `date "+yourfile.%m"` ---Ken To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message