Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #3566

Re: [OT] add carriage return to text files

From dale <dale@dalekelly.org>
Newsgroups comp.soft-sys.octave, comp.graphics.apps.gnuplot, comp.lang.awk
Subject Re: [OT] add carriage return to text files
Date 2017-03-04 12:01 -0500
Message-ID <a5bhdm.gt7.19.1@news.alt.net> (permalink)
References <a49sgg.tnn.19.1@news.alt.net> <20170219154106.891@kylheku.com> <a4a209.uhh.17.1@news.alt.net>

Cross-posted to 3 groups.

Show all headers | View raw


On 2/19/17 7:15 PM, dale wrote:
> On 2/19/17 6:54 PM, Kaz Kylheku wrote:
>> 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.
>>
> 
> Thanks Much!!!
> be back when I give it a try
> 

signed up for github, when I download a text file it still doesn't work 
in notepad, but it works in wordpad

guess it is a notepad problem

-- 
dale | http://www.dalekelly.org

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

[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 Lorenz <lorenznl@yahoo.com> - 2017-02-20 07:35 +0000
  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 Karl Ratzsch <mail.kfr@gmx.net> - 2017-02-20 10:03 +0100
      Re: [OT] add carriage return to text files dale <dale@dalekelly.org> - 2017-02-20 12:02 -0500

csiph-web