Path: csiph.com!xmission!news.alt.net From: dale Newsgroups: comp.soft-sys.octave,comp.graphics.apps.gnuplot,comp.lang.awk Subject: Re: [OT] add carriage return to text files Date: Sat, 4 Mar 2017 12:01:16 -0500 Lines: 53 Message-ID: References: <20170219154106.891@kylheku.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Thunderbird/53.0a2 In-Reply-To: Content-Language: en-US Xref: csiph.com comp.soft-sys.octave:97 comp.graphics.apps.gnuplot:3566 comp.lang.awk:6752 On 2/19/17 7:15 PM, dale wrote: > On 2/19/17 6:54 PM, Kaz Kylheku wrote: >> On 2017-02-19, dale 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