Thursday, July 24, 2014

How to generate phone number list in one line?

Sometimes need to generate some numbers, like phone numbers. 
And it should to be done quickly!

One line phone numbers generator in bash:
$ echo -e "\n"054{0..9}{0..9}{0..9}{0..9}{0..9}{0..9}{0..9} > phones.txt
$ cat phones.txt |head
0540000000 
0540000001 
0540000002 
0540000003 
0540000004 
0540000005 
0540000006 
0540000007 
0540000008 

$ cat phones.txt |tail
0549999990 
0549999991 
0549999992 
0549999993 
0549999994 
0549999995 
0549999996 
0549999997 
0549999998 
0549999999 

No comments:

Post a Comment