| PLEX86 | ||
|
User command to generate a formatted random numberI would like to be able generate a random number of specified size and format on demand, suitable for cutting and pasting in email, e.g., a 32 bit hexadecimal string such as 1A3F238D. A question about windoze trolls I've always wondered what could possibly motivate anyone to troll *nix groups-boards and promote Micro$oft's pooty "OS." As I see it, there are... The closest I've found is openssl rand, RAND(1), which can output a specified number of bytes, but then how to format them? I am vaguely aware that bash can do formatting of such things. Is that possible? I wouldn't mind a small script I can install inusr-local-bin, but what am I overlooking? The next closest would be rand(3) and ilk, so I suppose I could create a small program to fill the bill. I'm not a C programmer, though. BTW, can a bash script call a library function? Actually, something like 'openssl rand -base64 4' might fill the bill, as it's perfectly pasteable. But I thought I would look for something more flexible. The idea came when I was looking for a way to hand out private URL's, be a directory with only the x bit set. I wouldn't mind comments on that, also, especially if it's really dumb. :-) -- Just don't create a file called -rf. --Larry Wall X Server has crashed I have terrible day. Problems are followed by other problems. When I was doing something on ubuntu system crashed and later when I restarted...
|
||||