views:

103

answers:

3

Can someone please help in adding a command for "ENTER" in a .txt file to emulate "ENTER". Example; 12345 "enter" 548793 "ENTER" ..... where an entry will be a number followed by enter to next field where the next number will be inserted etc.. so it will look like this:

12345
548793
etc...
A: 

Just add newlines in the file?

12345
548793
etc...
applechewer
I think he has a file where "ENTER" (case insensitive) should be replaced with a newline. The problem is what tool / language he hopes to use to substitute string literals for newlines.
Tim Post
im importing a series of numbers which were captured by a scanner. the numbers are separated by a comma. I would like to insert a enter command in between the numbers so i can copy and paste from a notepad.txt into a spreadsheet in a column format
gary
+1  A: 

There is a difference between an enter and a return (-- old skool typewriter stuff - check Wikipedia on that).

One is a carriage return and one is a line feed; the ASCII codes for those are 10 and 13, I'd say test and find out which one (if not both) you'll need.

Normally (in like C++,C#,etc) you'd post \r\n --> 10 13

riffnl
im importing a series of numbers which were captured by a scanner. the numbers are separated by a comma. I would like to insert a enter command in between the numbers so i can copy and paste from a notepad.txt into a spreadsheet in a column format.
gary
Now that's more information then you've left in the original post; What programming language are you using to achieve this?
riffnl
A: 

The script that is reading in your txt file should already recognize whichever EOL character the text editor used. Many scripting languages automatically understand the various EOLs when reading from a filehandle. If yours doesn't, you may have to compose a regex that looks for the most common ones.

dnagirl