OS4 DepotLogo by DaveyD 
(anonymous IP: 54.80.60.91,1132) 
 HomeRecentStatsSearchSubmitUploadsMirrorsContactInfoDisclaimerConfigAdmin
 Menu

 Features
   Crashlogs
   Bug tracker
   Locale browser
 
 Categories

   o Audio (328)
   o Datatype (47)
   o Demo (180)
   o Development (528)
   o Document (21)
   o Driver (87)
   o Emulation (141)
   o Game (853)
   o Graphics (456)
   o Library (88)
   o Network (200)
   o Office (56)
   o Utility (804)
   o Video (60)

Total files: 3849

Full index file. Download
Recent index file. Download




 Links

  Amigans.net
  OpenAmiga
  Aminet
  IntuitionBase


Support the site


 Readme for:  Utility » Misc » uniquedate.lha

Uniquedate

Description: Generates unique (hi-res) numeric date/timestamps
Download: uniquedate.lha       (TIPS: Use the right click menu if your browser takes you back here all the time)
Size: 8kb
Version: 1.0
Date: 22 Jun 06
Author: Alex Carmona
Submitter: Alex Carmona
Email: AmigaOne/theworld net
Homepage: http://AM1GA.com
Category: utility/misc
License: Freeware
Distribute: yes
Min OS Version: 4.0
FileID: 1901
 
Comments: 0
Snapshots: 0
Downloads: 298  (Current version)
298  (Accumulated)
Votes: 0 (0/0)  (30 days/7 days)

Show comments Show snapshots Show content Show crashlogs Replace file 
UniqueDate is a command which generates a unique numeric date string.
Like my UniqueName utility, it's mostly useful in shell scripts, to avoid name
clashes when creating pipes and filenames, but it may also be useful as a
timestamp for automatically generated files.


Usage:
UniqueName G=GREGORIAN/S

The optional switch, "G" or "GREGORIAN", can be specified to switch
the string output format to a more human-friendly date.

The default format is the number of microseconds since Jan. 1st 1978.
E.g. 898499624016706 or SSSSSSSSSµµµµµµ (1 million µS. = 1 Seconds). 

The Gregorian format is the date and time with microseconds.
E.g. 20060622071344396890 or YYYYMMDDHHMMSSµµµµµµ


Examples: (taken straight from the UniqueName readme... I'm sooo lazy!)

Suppose that each time you run a script you want to log its output to a new
file...

 Execute Script >`UniqueDate G`.log

Perhaps within the script you want to redirect some output to other logfiles...

[Script]
 Set log1 Sys`UniqueDate G`.log
 Set log2 Usr`UniqueDate G`.log
 SomeCommand >>$log1
 SomeCommand >>$log2
 SomeCommand >>$log1
 etc...

You can run the script multiple times in parallel without risking overwriting
 another's log file.

Likewise with named PIPEs...

[Script]
 Set pre PIPE:`UniqueDate`
 Set post PIPE:`UniqueDate`
 Run Capture input=$pre output=$post
 Wait 1
 Run Broadcast source=$post




Copyright (c) 2004-2017 by Björn Hagström All Rights Reserved
Amiga OS and its logos are registered trademarks of Hyperion Entertainment