public inbox for speakup@linux-speakup.org
 help / color / mirror / Atom feed
From: "Deborah Norling" <debee@jfcl.com>
To: "'Speakup is a screen review system for Linux.'"
	<speakup@braille.uwo.ca>
Subject: RE: Trying out Slackware
Date: Mon, 25 Jun 2007 20:45:26 -0700	[thread overview]
Message-ID: <007801c7b7a4$6f7226a0$eb01010a@Reason> (raw)
In-Reply-To: <EE4ACF1C674340ACBCD17385132AFA30@Michelle>

This thread has morphed in to discussing ways to convert line endings. 

I think the most portable tool is awk. I just love awk.

In the below one-liners, bns is the Braille 'N speak, or Macintosh; both use
only CR and not LF at the ends of lines:

from Unix to bns
  awk '{ gsub("\r", "\n"); print $0;}' macfile.txt > unixfile.txt

from bns to unix
  awk '{ gsub("\r", "\n"); print $0;}' macfile.txt > unixfile.txt

unix to Windows
  awk '{ sub("\r$", ""); print }' winfile.txt > unixfile.txt

windows to unix
  awk 'sub("$", "\r")' unixfile.txt > winfile.txt

Works in Netbsd, freebsd, Windows, DOS, ultrix, even vms, provided you got
awk.

--Debee



  reply	other threads:[~ UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
 Zachary Kline
 ` Littlefield, tyler
 ` Doug Sutherland
 ` Gaijin
   ` Littlefield, tyler
   ` Adam Myrow
     ` Gaijin
       ` ace
         ` Deborah Norling [this message]
 ` Ralph W. Reid
   ` Steve Holmes
     ` ace

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='007801c7b7a4$6f7226a0$eb01010a@Reason' \
    --to=debee@jfcl.com \
    --cc=speakup@braille.uwo.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).