Jump to content

Sequential Number Generator


digivore

Recommended Posts

Looking for a command or script to generate sequential numbers and save them to a text file.

10 digit long numbers (eg. phone number with area code), I would like to specify the starting number, and the end(or at least the amount of numbers).

Could do this in Linux or windows.

Anyone have any ideas?

Thanks

Link to comment
Share on other sites

Here you go, just modify the start and end values for the loop

# php > your_filename
<?
for ($i=1000000000;$i<1000000009;$i++) {
print $i."\n";
}
?>
<ctrl>-d

# cat your_filename
1000000000
1000000001
1000000002
1000000003
1000000004
1000000005
1000000006
1000000007
1000000008

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...