Audio (340) Datatype (50) Demo (203) Development (592) Document (22) Driver (100) Emulation (146) Game (984) Graphics (491) Library (112) Network (230) Office (65) Utility (907) Video (68)
Total files: 4310
Full index file Recent index file
Amigans.net OpenAmiga Aminet IntuitionBase
|
Uniquename | Description: | Generates unique (random) strings | Download: | uniquename.lha (TIPS: Use the right click menu if your browser takes you back here all the time) | Size: | 9kb | Version: | 1.0 | Date: | 22 Jun 2006 | 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: | 1900 | | | Comments: | 0 | Snapshots: | 0 | Videos: | 0 | Downloads: | 329 (Current version) | | 329 (Accumulated) | Votes: | 0 (0/0) (30 days/7 days) | |
Based on Fredrik Wikstrom's mkpasswd utility
Description:
UniqueName is a command that generates a random and (hopefully) unique
alphanumeric string.
It's mostly useful in shell scripts, to avoid name clashes when creating pipes
and filenames.
Usage:
UniqueName <length>
The command accepts a single (optional) argument, the length of the string to
be generated.
Length should be a value between 4 and 40.
It defaults to 8 if no value was specified.
Any other argument will return the usage template.
The minimum length of 4 characters represents over 1.6 million (36*36*36*36)
possibilities and should be safe enough for its intended use.
With 8 chars you get over 2.8 trillion possibilities, and if you're really
paranoid (nuts?), use 40, that represents over...
1600000000000000000000000000000000000000000000000000000000000 possibilities!
Examples:
Suppose that each time you run a script you want to log its output to a new
file...
Execute Script >`UniqueName`.log
Perhaps within the script you want to redirect some output to other logfiles...
[Script]
Set log1 Sys`UniqueName 4`.log
Set log2 Usr`UniqueName 4`.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:`UniqueName`
Set post PIPE:`UniqueName`
Run Capture input=$pre output=$post
Wait 1
Run Broadcast source=$post
|