Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3557 > unrolled thread
| Started by | dale <dale@dalekelly.org> |
|---|---|
| First post | 2017-02-19 17:41 -0500 |
| Last post | 2017-02-20 12:02 -0500 |
| Articles | 8 — 5 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
[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
| From | dale <dale@dalekelly.org> |
|---|---|
| Date | 2017-02-19 17:41 -0500 |
| Subject | [OT] add carriage return to text files |
| Message-ID | <a49sgg.tnn.19.1@news.alt.net> |
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 any ideas? probably could do an awk file on each, that would save some time want to do them in a batch all at once, guess I could do a bash script of awk conversions if someone has already done this, or knows how, would you point me in the right direction? tried to google some ... -- dale | http://www.dalekelly.org
[toc] | [next] | [standalone]
| From | Kaz Kylheku <336-986-7787@kylheku.com> |
|---|---|
| Date | 2017-02-19 23:54 +0000 |
| Message-ID | <20170219154106.891@kylheku.com> |
| In reply to | #3557 |
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.
[toc] | [prev] | [next] | [standalone]
| From | dale <dale@dalekelly.org> |
|---|---|
| Date | 2017-03-04 12:01 -0500 |
| Message-ID | <a5bhdm.gt7.19.1@news.alt.net> |
| In reply to | #3558 |
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
[toc] | [prev] | [next] | [standalone]
| From | Lorenz <lorenznl@yahoo.com> |
|---|---|
| Date | 2017-02-20 07:35 +0000 |
| Message-ID | <o07lacp67q5p1d5jceqlqjh9s1dh7b8asp@4ax.com> |
| In reply to | #3557 |
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 > >any ideas? probably could do an awk file on each, that would save some time > >want to do them in a batch all at once, guess I could do a bash script >of awk conversions > >if someone has already done this, or knows how, would you point me in >the right direction? > >tried to google some ... google for unix2dos -- Lorenz
[toc] | [prev] | [next] | [standalone]
| From | Karl Ratzsch <mail.kfr@gmx.net> |
|---|---|
| Date | 2017-02-20 09:03 +0100 |
| Message-ID | <o8e7ss$50d$1@solani.org> |
| In reply to | #3557 |
Am 19.02.2017 um 23:41 schrieb dale: > 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 > > any ideas? probably could do an awk file on each, that would save some time > > want to do them in a batch all at once, guess I could do a bash script > of awk conversions Just don't use the horrible built-in "notepad.exe" editor on windows, but one of the much better configurable alternatives.
[toc] | [prev] | [next] | [standalone]
| From | gazelle@shell.xmission.com (Kenny McCormack) |
|---|---|
| Date | 2017-02-20 08:29 +0000 |
| Message-ID | <o8e9co$2rj$2@news.xmission.com> |
| In reply to | #3560 |
In article <o8e7ss$50d$1@solani.org>, Karl Ratzsch <mail.kfr@gmx.net> wrote: >Am 19.02.2017 um 23:41 schrieb dale: >> 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 >> >> any ideas? probably could do an awk file on each, that would save some time >> >> want to do them in a batch all at once, guess I could do a bash script >> of awk conversions > > > >Just don't use the horrible built-in "notepad.exe" editor on windows, >but one of the much better configurable alternatives. > This is good advice. For the most part, there's no real problem with just leaving the files as they are (i.e., in Unix/Linux format). Most Windows programs will work OK. It is just that the default editor - the one people intuitively recommend for newbies, even though they'd never actually use it themselves - is brain dead about this. The simplest alternative is "Wordpad", which is installed by default in Windows (no special install or configuration needed) and has no problem displaying files w/o CRs. But, yeah, I get caught by this every once in a while - bringing up a Unix file in Notepad and going Arrrrghhhh! -- First of all, I do not appreciate your playing stupid here at all. - Thomas 'PointedEars' Lahn -
[toc] | [prev] | [next] | [standalone]
| From | Karl Ratzsch <mail.kfr@gmx.net> |
|---|---|
| Date | 2017-02-20 10:03 +0100 |
| Message-ID | <o8ebds$7aa$1@solani.org> |
| In reply to | #3561 |
Am 20.02.2017 um 09:29 schrieb Kenny McCormack: > In article <o8e7ss$50d$1@solani.org>, Karl Ratzsch <mail.kfr@gmx.net> wrote: >> Just don't use the horrible built-in "notepad.exe" editor on windows, >> but one of the much better configurable alternatives. >> > > This is good advice. For the most part, there's no real problem with just > leaving the files as they are (i.e., in Unix/Linux format). Most Windows > programs will work OK. It is just that the default editor - the one people > intuitively recommend for newbies, even though they'd never actually use it > themselves - is brain dead about this. > > The simplest alternative is "Wordpad", which is installed by default in > Windows (no special install or configuration needed) and has no problem > displaying files w/o CRs. Wordpad, irks. ;-) notepad2, notepad++ are two free alternatives I'm using, with configurable encoding, line ending, syntax highligthing etc. Installing one of those is the second thing I do on any new windows machine, right after disabling the stupid system sound effects. There are dozens of others, many of them probably as useful.
[toc] | [prev] | [next] | [standalone]
| From | dale <dale@dalekelly.org> |
|---|---|
| Date | 2017-02-20 12:02 -0500 |
| Message-ID | <a4bt0u.iou.19.1@news.alt.net> |
| In reply to | #3561 |
On 2/20/17 3:29 AM, Kenny McCormack wrote: > In article <o8e7ss$50d$1@solani.org>, Karl Ratzsch <mail.kfr@gmx.net> wrote: >> Am 19.02.2017 um 23:41 schrieb dale: >>> 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 >>> >>> any ideas? probably could do an awk file on each, that would save some time >>> >>> want to do them in a batch all at once, guess I could do a bash script >>> of awk conversions >> >> >> >> Just don't use the horrible built-in "notepad.exe" editor on windows, >> but one of the much better configurable alternatives. >> > > This is good advice. For the most part, there's no real problem with just > leaving the files as they are (i.e., in Unix/Linux format). Most Windows > programs will work OK. It is just that the default editor - the one people > intuitively recommend for newbies, even though they'd never actually use it > themselves - is brain dead about this. > > The simplest alternative is "Wordpad", which is installed by default in > Windows (no special install or configuration needed) and has no problem > displaying files w/o CRs. > > But, yeah, I get caught by this every once in a while - bringing up a Unix > file in Notepad and going Arrrrghhhh! > for some reason they need the carriage returns in a <div> code block in HTML on Edge or Internet Explorer, I don't currently have an example to show, but will be back, might be a CSS configuration for <div> -- dale | http://www.dalekelly.org
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web