5

I have a file which is like

email = myemail@gmail.com
email = myemail@gmail.com
email = myemail@gmail.com

Can I make it like this?

email = myemail1@gmail.com
email = myemail2@gmail.com
email = myemail3@gmail.com

Can I do this in any text editor? Or is there any other way? Thanks.

arulmr
  • 8,620
  • 9
  • 54
  • 69
Manoj M J
  • 409
  • 4
  • 16

3 Answers3

2

I would say use Vim, but for Notepad++:

hold Alt and select the column of numbers that you wish to change. Then go to Edit->Column Editor and select the Number to Insert radio button in the window that appears. Then specify your initial number and increment, and hit OK. It should write out the incremented numbers.

copied from here.

To apply it, do it once for @gmail.com then the 1,2,3, lastly the prefix email = myemail.

I really like to recommend vim (again), you could do many stuff like these with one-liners.

Community
  • 1
  • 1
cctan
  • 2,015
  • 3
  • 19
  • 29
0

Whack it into excel and write a formula to insert the row number before the @ symbol. =Substitute(YourCell, "@", Row() & "@")

EDIT:

Assuming that you have your email in cell A1, the formula would be

=SUBSTITUTE(A1,"@",ROW()&"@")
yu_ominae
  • 2,975
  • 6
  • 39
  • 76
0

SlickEdit can do with a block-selection and then an enumeration insertion.

Basically, select a vertical block before the "@", 3 lines high.

Then insert an enumeration starting at 1.

joeking
  • 2,006
  • 18
  • 29