[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New line problem?
From: |
Andreas Weber |
Subject: |
Re: New line problem? |
Date: |
Fri, 3 Feb 2017 06:21:23 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 |
Am 02.02.2017 um 23:33 schrieb Athanatos:
> I'm trying to make a program to extract some information from a text file and
> recreate it in new files.
>
> I may be doing something very wrong but when writing to a new file with
> fprintf no new lines are created with \n
>
> I'm uploading the file I want to take data from so that you can recreate it
>
> _carddb.txt <http://octave.1599824.n4.nabble.com/file/n4681734/_carddb.txt>
> mulligan.m <http://octave.1599824.n4.nabble.com/file/n4681734/mulligan.m>
You code works fine here on GNU/Linux Debian (although I think it can be
much easier to use regex). So I guess your editor/viewer perhaps has
problems with newline "\n" instead of carriage return + newline "\r".
TL;DR: try replacing "\n" with "\r"
Andy