From owner-freebsd-questions Sun Jun 14 10:58:22 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA04964 for freebsd-questions-outgoing; Sun, 14 Jun 1998 10:58:22 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from firewall2.startribune.com (firewall2.startribune.com [132.148.80.211]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA04958 for ; Sun, 14 Jun 1998 10:58:15 -0700 (PDT) (envelope-from bendede@startribune.com) Received: by firewall2.startribune.com; id NAA05809; Sun, 14 Jun 1998 13:08:23 -0500 (CDT) Received: from mailserv1.startribune.com(132.148.25.25) by firewall2.startribune.com via smap (3.2) id xma005804; Sun, 14 Jun 98 13:08:19 -0500 Received: from MANNY ([132.148.63.204]) by mailserv1.startribune.com (8.9.0/8.9.0) with SMTP id MAA17778; Sun, 14 Jun 1998 12:54:20 -0500 (CDT) Received: by MANNY with Microsoft Mail id <01BD9794.F9ABC5E0@MANNY>; Sun, 14 Jun 1998 13:04:33 -0500 Message-ID: <01BD9794.F9ABC5E0@MANNY> From: Dave Bender To: "questions@FreeBSD.ORG" , "'Ken McGlothlen'" Subject: RE: Unix commands Date: Sun, 14 Jun 1998 13:03:59 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Yours is the best one yet, Ken. Good suggestion. ---------- From: Ken McGlothlen Sent: Sunday, June 14, 1998 11:58 AM To: questions@FreeBSD.ORG Subject: Re: Unix commands 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message