From owner-freebsd-newbies Sun Aug 15 7:10:18 1999 Delivered-To: freebsd-newbies@freebsd.org Received: from avarice.riverstyx.net (hq-port-89.harbour-dhcp-pool.infinetgroup.com [207.23.37.89]) by hub.freebsd.org (Postfix) with ESMTP id 7C0A11533E for ; Sun, 15 Aug 1999 07:09:54 -0700 (PDT) (envelope-from unknown@riverstyx.net) Received: from avarice (unknown@avarice [10.0.0.2]) by localhost.localdomain (8.9.3/8.9.3) with ESMTP id MAA07578; Mon, 2 Aug 1999 12:01:41 -0700 Date: Mon, 2 Aug 1999 12:01:41 -0700 (PDT) From: Tani Hosokawa To: Istvan & Agra Baroti Cc: freebsd-newbies@FreeBSD.ORG Subject: Re: need short unix program In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-newbies@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org cron job... */10 * * * * cp /usr/myname/webcamera.jpg /usr/myname/mydirectory/`date +%Y-%m-%d`.jpg anywhere you throw backticks, you'll get the result interpolated into your command. On Mon, 2 Aug 1999, Istvan & Agra Baroti wrote: > > help me! > > i want to make a program which allow to copy a file: > > /usr/myname/webcamera.jpg > > to a file: > > /usr/myname/mydirectory/current_date.jpg > > AT EVERY 10 SECONDS. > > The current_date string must include HH/MM/.ss because I want to make an > archive directory /usr/myname/mydirectory/ with photos taken every 10 > seconds at the 11 August Solar Eclipse with a webcamera on our Unix > FreeBSD 3.1 server. The webcamera produces a webcamera.jpg file EVERY TIME > WITH THE SAME NAME: webcamera.jpg AND OVERWRITE IT. I WANT TO SAVE THESE > pictues/FILES WITH NEW NAME: current_date.jpg but I don't know how to > extract a strig from the date command. > > please help. > > #!/bin/sh > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-newbies" in the body of the message > --- tani hosokawa river styx internet To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-newbies" in the body of the message