Groups | Search | Server Info | Login | Register
Groups > comp.soft-sys.octave > #93
| From | Kaz Kylheku <336-986-7787@kylheku.com> |
|---|---|
| Newsgroups | comp.soft-sys.octave, comp.graphics.apps.gnuplot, comp.lang.awk |
| Subject | Re: [OT] add carriage return to text files |
| Followup-To | comp.lang.awk |
| Date | 2017-02-19 23:54 +0000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <20170219154106.891@kylheku.com> (permalink) |
| References | <a49sgg.tnn.19.1@news.alt.net> |
Cross-posted to 3 groups.
Followups directed to: comp.lang.awk
On 2017-02-19, dale <dale@dalekelly.org> wrote: > I have a bunch of octave, gnuplot and awk files that I made in gedit on > linux, they only have a linefeed at the end of a line, I would like to > add a carriage return after each linefeed so I can see them on windows Learn real editor. Vim: :set fileformat=dos :w File now saved with CR-LF line endings. Next time you open the file, Vim will automatically use this fileformat setting. If you you are just simply using a shared folder between Linux and Windows, or copying the files back and forth, consider just keeping the files in Windows format. If Octave and Gnuplot on Linux don't mind the CR's, you're just fine. Edit in a decent editor and you won't see the line endings. Regarding conversion, the manpage for "unix2dos" and "dos2unix". Another thing: you should consider putting your files into a cross-platform version control system like Git. A version control system can create a working copy of text files in the local operating system format. You can make a change on Windows to your Octave or Awk code, commit the change, then push it out to your Linux-side repository where the update is seen in Unix format. No software developer worth their salt performs conversions on their maintained source code between Unix and Windows. Version control takes care of it. I wouldn't develop anything other than throwaway code without version control.
Back to comp.soft-sys.octave | Previous | Next — Previous in thread | Next in thread | Find similar
[OT] add carriage return to text files dale <dale@dalekelly.org> - 2017-02-19 17:41 -0500
Re: [OT] add carriage return to text files Kaz Kylheku <336-986-7787@kylheku.com> - 2017-02-19 23:54 +0000
Re: [OT] add carriage return to text files dale <dale@dalekelly.org> - 2017-03-04 12:01 -0500
Re: [OT] add carriage return to text files Karl Ratzsch <mail.kfr@gmx.net> - 2017-02-20 09:03 +0100
Re: [OT] add carriage return to text files gazelle@shell.xmission.com (Kenny McCormack) - 2017-02-20 08:29 +0000
Re: [OT] add carriage return to text files dale <dale@dalekelly.org> - 2017-02-20 12:02 -0500
csiph-web