Tips & Tricks

Using Text Editors to Replace New Lines w/ Comma

Using Vi

  1. Open the file in Vi editor
  2. Switch to command mode.
  3. To replace all newline characters with comma use
    :1,$s/\n/, /g
  4. Press Enter

Using NotePad++

  1. Open a NotePad++ window.
  2. Insert Find and Replace mode.
  3. Within the Find What field, enter the following:
  4. Within the Replace with field, enter a comma.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s