Remove line breaks (text file)
Solved
Bernd
-
Bernd -
Bernd -
Hello,
I have a file whose text looks like this:
I would like to remove the line breaks from the lines starting with #, to get this:
Is there a simple way to perform this operation?
Thank you in advance for your answers!
I have a file whose text looks like this:
# String1 String2 # String3 String4 # String5 String6
I would like to remove the line breaks from the lines starting with #, to get this:
# String1 String2 # String3 String4 # String5 String6
Is there a simple way to perform this operation?
Thank you in advance for your answers!
Configuration: Windows XP Firefox 3.5
5 réponses
Hello,
On Linux, using the command line with a small utility called "sed" (which also has a version for Windows), it's a formality:
--
$ man woman
There is no manual page for woman.
On Linux, using the command line with a small utility called "sed" (which also has a version for Windows), it's a formality:
tmpfs]$ cat plop # String1 String2 # String3 String4 # String5 String6 [tmpfs]$ sed -i.bak 'N;s/\n/ /' plop [tmpfs]$ cat plop # String1 String2 # String3 String4 # String5 String6 [tmpfs]$If you ever wanted to try it, you'll need to adapt the command for Windows regarding the "end of line" character (\n) which translates to "carriage return + line feed" (\r\n)...
--
$ man woman
There is no manual page for woman.