Re: Adding carriage returns to text file
There are tools for this task, because it's a common need whichever platform one is on. Here's a relevant article: http://hints.macworld.com/article.php?story=20031018164326986 I have not used LineBrake myself, mostly because I generally use the Unix/Linux dos2unix (or unix2dos) tool which does the same thing. Here's a bit more info about what this is all about: Microsoft indicates end of line with a pair of control characters, both Ctrl-J and Ctrl-M together. Unix/Linux uses only Ctrl-J Apple uses Ctrl-M Ergo: We need a tool that will assist reading our files when we port them among platforms. hth Janina Tyler Thompson writes: > You could also use regular expressions in a wide variety of text editors to > replace all \n characters (newline) with \r\n (basically the carriage return > you were looking for) > > Sent from my iPhone > > > On Jun 20, 2017, at 14:42, Chris Moorewrote: > > > > Hello, > > I had the need to add carriage returns to a text file created on my mac so > > I could read it properly on my braille device. After several hours of > > experimentation from articles found on google, I discovered that the only > > way to accomplish this was using the “vi” program in terminal. Here are > > the steps: > > > > 1. open the terminal program. > > 2. interact with the terminal window with vo shift down-arrow. > > 3. if the file is not in your home directory, change to the appropriate > > folder with the “cd” command. > > 4. Open the file with the vi editor with “vi file” > > 5. type: “:set fileformat=dos” > > 6. Now save the file with “:wq” > > > > Remember that the quotes around the above commands are NOT to be entered. > > > > There may be other approaches, but this one is quite simple once you use it > > a few times. > > > > Chris > > > > -- > > The following information is important for all members of the Mac > > Visionaries list. > > > > If you have any questions or concerns about the running of this list, or if > > you feel that a member's post is inappropriate, please contact the owners > > or moderators directly rather than posting on the list itself. > > > > Your Mac Visionaries list moderator is Mark Taylor. You can reach mark at: > > macvisionaries+modera...@googlegroups.com and your owner is Cara Quinn - > > you can reach Cara at caraqu...@caraquinn.com > > > > The archives for this list can be searched at: > > http://www.mail-archive.com/macvisionaries@googlegroups.com/ > > --- > > You received this message because you are subscribed to the Google Groups > > "MacVisionaries" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to macvisionaries+unsubscr...@googlegroups.com. > > To post to this group, send email to macvisionaries@googlegroups.com. > > Visit this group at https://groups.google.com/group/macvisionaries. > > For more options, visit https://groups.google.com/d/optout. > > -- > The following information is important for all members of the Mac Visionaries > list. > > If you have any questions or concerns about the running of this list, or if > you feel that a member's post is inappropriate, please contact the owners or > moderators directly rather than posting on the list itself. > > Your Mac Visionaries list moderator is Mark Taylor. You can reach mark at: > macvisionaries+modera...@googlegroups.com and your owner is Cara Quinn - you > can reach Cara at caraqu...@caraquinn.com > > The archives for this list can be searched at: > http://www.mail-archive.com/macvisionaries@googlegroups.com/ > --- > You received this message because you are subscribed to the Google Groups > "MacVisionaries" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to macvisionaries+unsubscr...@googlegroups.com. > To post to this group, send email to macvisionaries@googlegroups.com. > Visit this group at https://groups.google.com/group/macvisionaries. > For more options, visit https://groups.google.com/d/optout. -- Janina Sajka, Phone: +1.443.300.2200 sip:jan...@asterisk.rednote.net Email: jan...@rednote.net Linux Foundation Fellow Executive Chair, Accessibility Workgroup: http://a11y.org The World Wide Web Consortium (W3C), Web Accessibility Initiative (WAI) Chair, Accessible Platform Architectureshttp://www.w3.org/wai/apa -- The following information is important for all members of the Mac Visionaries list. If you have any questions or concerns about the running of this list, or if you feel that a member's post is inappropriate, please contact the owners or moderators directly rather than posting on the list itself. Your Mac Visionaries list moderator is Mark Taylor. You can reach mark at: macvisionaries+modera...@googlegroups.com and your owner is Cara Quinn - you can reach Cara at caraqu...@caraquinn.com The archives for this list can be searched at:
Re: Adding carriage returns to text file
Hi Tyler, As well as using search and replace as another lister suggests, you can set TextEdit to save all files in the Windows format if preferred. Go into TextEdit Preferences, choose the Open and Save tab, then look at the settings for Plain Text File Encoding. Regards. Ian > On 20 Jun 2017, at 23:54, Tyler Thompsonwrote: > > You could also use regular expressions in a wide variety of text editors to > replace all \n characters (newline) with \r\n (basically the carriage return > you were looking for) > > Sent from my iPhone > >> On Jun 20, 2017, at 14:42, Chris Moore wrote: >> >> Hello, >> I had the need to add carriage returns to a text file created on my mac so I >> could read it properly on my braille device. After several hours of >> experimentation from articles found on google, I discovered that the only >> way to accomplish this was using the “vi” program in terminal. Here are the >> steps: >> >> 1. open the terminal program. >> 2. interact with the terminal window with vo shift down-arrow. >> 3. if the file is not in your home directory, change to the appropriate >> folder with the “cd” command. >> 4. Open the file with the vi editor with “vi file” >> 5. type: “:set fileformat=dos” >> 6. Now save the file with “:wq” >> >> Remember that the quotes around the above commands are NOT to be entered. >> >> There may be other approaches, but this one is quite simple once you use it >> a few times. >> >> Chris >> >> -- >> The following information is important for all members of the Mac >> Visionaries list. >> >> If you have any questions or concerns about the running of this list, or if >> you feel that a member's post is inappropriate, please contact the owners or >> moderators directly rather than posting on the list itself. >> >> Your Mac Visionaries list moderator is Mark Taylor. You can reach mark at: >> macvisionaries+modera...@googlegroups.com and your owner is Cara Quinn - you >> can reach Cara at caraqu...@caraquinn.com >> >> The archives for this list can be searched at: >> http://www.mail-archive.com/macvisionaries@googlegroups.com/ >> --- >> You received this message because you are subscribed to the Google Groups >> "MacVisionaries" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to macvisionaries+unsubscr...@googlegroups.com. >> To post to this group, send email to macvisionaries@googlegroups.com. >> Visit this group at https://groups.google.com/group/macvisionaries. >> For more options, visit https://groups.google.com/d/optout. > > -- > The following information is important for all members of the Mac Visionaries > list. > > If you have any questions or concerns about the running of this list, or if > you feel that a member's post is inappropriate, please contact the owners or > moderators directly rather than posting on the list itself. > > Your Mac Visionaries list moderator is Mark Taylor. You can reach mark at: > macvisionaries+modera...@googlegroups.com and your owner is Cara Quinn - you > can reach Cara at caraqu...@caraquinn.com > > The archives for this list can be searched at: > http://www.mail-archive.com/macvisionaries@googlegroups.com/ > --- > You received this message because you are subscribed to the Google Groups > "MacVisionaries" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to macvisionaries+unsubscr...@googlegroups.com. > To post to this group, send email to macvisionaries@googlegroups.com. > Visit this group at https://groups.google.com/group/macvisionaries. > For more options, visit https://groups.google.com/d/optout. -- The following information is important for all members of the Mac Visionaries list. If you have any questions or concerns about the running of this list, or if you feel that a member's post is inappropriate, please contact the owners or moderators directly rather than posting on the list itself. Your Mac Visionaries list moderator is Mark Taylor. You can reach mark at: macvisionaries+modera...@googlegroups.com and your owner is Cara Quinn - you can reach Cara at caraqu...@caraquinn.com The archives for this list can be searched at: http://www.mail-archive.com/macvisionaries@googlegroups.com/ --- You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To unsubscribe from this group and stop receiving emails from it, send an email to macvisionaries+unsubscr...@googlegroups.com. To post to this group, send email to macvisionaries@googlegroups.com. Visit this group at https://groups.google.com/group/macvisionaries. For more options, visit https://groups.google.com/d/optout.
Re: Adding carriage returns to text file
You could also use regular expressions in a wide variety of text editors to replace all \n characters (newline) with \r\n (basically the carriage return you were looking for) Sent from my iPhone > On Jun 20, 2017, at 14:42, Chris Moorewrote: > > Hello, > I had the need to add carriage returns to a text file created on my mac so I > could read it properly on my braille device. After several hours of > experimentation from articles found on google, I discovered that the only way > to accomplish this was using the “vi” program in terminal. Here are the > steps: > > 1. open the terminal program. > 2. interact with the terminal window with vo shift down-arrow. > 3. if the file is not in your home directory, change to the appropriate > folder with the “cd” command. > 4. Open the file with the vi editor with “vi file” > 5. type: “:set fileformat=dos” > 6. Now save the file with “:wq” > > Remember that the quotes around the above commands are NOT to be entered. > > There may be other approaches, but this one is quite simple once you use it a > few times. > > Chris > > -- > The following information is important for all members of the Mac Visionaries > list. > > If you have any questions or concerns about the running of this list, or if > you feel that a member's post is inappropriate, please contact the owners or > moderators directly rather than posting on the list itself. > > Your Mac Visionaries list moderator is Mark Taylor. You can reach mark at: > macvisionaries+modera...@googlegroups.com and your owner is Cara Quinn - you > can reach Cara at caraqu...@caraquinn.com > > The archives for this list can be searched at: > http://www.mail-archive.com/macvisionaries@googlegroups.com/ > --- > You received this message because you are subscribed to the Google Groups > "MacVisionaries" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to macvisionaries+unsubscr...@googlegroups.com. > To post to this group, send email to macvisionaries@googlegroups.com. > Visit this group at https://groups.google.com/group/macvisionaries. > For more options, visit https://groups.google.com/d/optout. -- The following information is important for all members of the Mac Visionaries list. If you have any questions or concerns about the running of this list, or if you feel that a member's post is inappropriate, please contact the owners or moderators directly rather than posting on the list itself. Your Mac Visionaries list moderator is Mark Taylor. You can reach mark at: macvisionaries+modera...@googlegroups.com and your owner is Cara Quinn - you can reach Cara at caraqu...@caraquinn.com The archives for this list can be searched at: http://www.mail-archive.com/macvisionaries@googlegroups.com/ --- You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To unsubscribe from this group and stop receiving emails from it, send an email to macvisionaries+unsubscr...@googlegroups.com. To post to this group, send email to macvisionaries@googlegroups.com. Visit this group at https://groups.google.com/group/macvisionaries. For more options, visit https://groups.google.com/d/optout.
Adding carriage returns to text file
Hello, I had the need to add carriage returns to a text file created on my mac so I could read it properly on my braille device. After several hours of experimentation from articles found on google, I discovered that the only way to accomplish this was using the “vi” program in terminal. Here are the steps: 1. open the terminal program. 2. interact with the terminal window with vo shift down-arrow. 3. if the file is not in your home directory, change to the appropriate folder with the “cd” command. 4. Open the file with the vi editor with “vi file” 5. type: “:set fileformat=dos” 6. Now save the file with “:wq” Remember that the quotes around the above commands are NOT to be entered. There may be other approaches, but this one is quite simple once you use it a few times. Chris -- The following information is important for all members of the Mac Visionaries list. If you have any questions or concerns about the running of this list, or if you feel that a member's post is inappropriate, please contact the owners or moderators directly rather than posting on the list itself. Your Mac Visionaries list moderator is Mark Taylor. You can reach mark at: macvisionaries+modera...@googlegroups.com and your owner is Cara Quinn - you can reach Cara at caraqu...@caraquinn.com The archives for this list can be searched at: http://www.mail-archive.com/macvisionaries@googlegroups.com/ --- You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To unsubscribe from this group and stop receiving emails from it, send an email to macvisionaries+unsubscr...@googlegroups.com. To post to this group, send email to macvisionaries@googlegroups.com. Visit this group at https://groups.google.com/group/macvisionaries. For more options, visit https://groups.google.com/d/optout.