[lug] Fwd: Simple counter?

Jeffrey S. Haemer jeffrey.haemer at gmail.com
Fri May 24 09:39:51 MDT 2013


Folks,

I want something that returns me sequential integers.  I ask it, I get a 1.
 Three more times?  I get 2,3,4.  You ask it, you get 5, I ask again, I get
6, and so on.  If we both call it at the same time, we should *not* get the
same number.

Must persist over re-boots.

Sort of like /dev/urandom, but less random. :-)

We could all write simple programs to do this in lots of different ways,
but doesn't it seem like there should already be some utility already out
there that fits the bill?

It would be nice if I could give it a seed -- "start with 12" or something
-- but that's not critical. It would be nice if I could ask it what the
next number will be without bumping the counter.  Also not critical.  It
would even be nice if it offered remote access, so all machines could use
the same counter. Again, not critical.

I couldn't find, or think of, something quickly, so I thought I'd ask you.

Honest: this isn't "How can I write a simple program to do this?"  It's,
"Hasn't *someone* created a simple, standard utility that does this in the
past 20 or 30 years?"

-- 
Jeffrey Haemer <jeffrey.haemer at gmail.com>
720-837-8908 [cell], http://seejeffrun.blogspot.com [blog],
http://www.youtube.com/user/goyishekop [vlog]
*פרייהייט? דאס איז יאַנג דינען וואָרט.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20130524/8b5b1b4e/attachment.html>


More information about the LUG mailing list