tr problem



Hi folks;

I'm trying to convert a test file, src code for a legacy computer, whose eol is
a single cr into one with a newline subbed for each cr, and tr is being a pita,
it broken, or there is PEBKAC.

If I use this syntax:

tr -c \r \n <filename >filename2

Then the whole file is converted to nnnnnnnnnn's, every byte.

The manpage (and pinfo tr too) is, shall we say, completely lacking in how to
handle the file I/O.

So how do you use tr?"

Or is there a better tool for this than tr?

Thanks.

--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
"I'm really enjoying not talking to you ... Let's not talk again ____REAL
soon ..."

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list



Relevant Pages

  • Re: tr problem
    ... I'm trying to convert a test file, src code for a legacy computer, whose eol is ...
    (Fedora)
  • Re: tr problem
    ... I'm trying to convert a test file, src code for a legacy computer, whose ... eol is a single cr into one with a newline subbed for each cr, ... The manpage is, shall we say, completely lacking in how ...
    (Fedora)
  • Re: about Python doc reader
    ... You could read para by para if that were more useful: ... x'0A' to end of file even though source file itself has no EOL. ... One crlf is probably from python's print text, ... Might be best to take a real good look at a test file before assuming anything. ...
    (comp.lang.python)