From owner-freebsd-newbies Mon Aug 2 12:54:32 1999 Delivered-To: freebsd-newbies@freebsd.org Received: from mail.rdc1.va.home.com (ha1.rdc1.va.home.com [24.2.32.66]) by hub.freebsd.org (Postfix) with ESMTP id B65CA14C1E for ; Mon, 2 Aug 1999 12:54:25 -0700 (PDT) (envelope-from david32@home.com) Received: from home.com ([24.2.56.221]) by mail.rdc1.va.home.com (InterMail v4.01.01.00 201-229-111) with ESMTP id <19990802195327.IJDX22019.mail.rdc1.va.home.com@home.com> for ; Mon, 2 Aug 1999 12:53:27 -0700 Message-ID: <37A5F704.4C72A521@home.com> Date: Mon, 02 Aug 1999 15:52:36 -0400 From: David Organization: @Home Network X-Mailer: Mozilla 4.61 [en]C-AtHome0405 (Win98; I) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-newbies@FreeBSD.ORG Subject: Re: need short unix program Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-newbies@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org try this.. work with the code a bit. it worked on HP-UX on saving output data under date/time filenames here is how I did it: tmp=`date +%Y%m%d` mv report.txt newname.$tmp 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-newbies" in the body of the message