[prev in list] [next in list] [prev in thread] [next in thread] 

List:       suse-linux-e
Subject:    Re: [SLE] Easy shell script required.... create a unique filename
From:       Christopher Mahmood <ckm () suse ! com>
Date:       2002-05-06 16:16:43
[Download RAW message or body]

* dids (richard@diddyland.com) [020506 08:56]:
> I need to make a script
> that makes a filename based on todays date/time and then calls the program to 
> record sound at that time ( program is called yarec )
> 
> $filename = time and date
> yarec  $filename.wav

#!/bin/sh
filename="something-$(date +%Y%m%d)-$(date +%T)"
yarec $filename
#----

That will produce a file name that looks like: 
        something-20020506-09:14:39
but you can format it however you'd like...see date(1).

-- 

-ckm

-- 
To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com
For additional commands send e-mail to suse-linux-e-help@suse.com             
Also check the archives at http://lists.suse.com     


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic