Re: tr problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Thu, 12 Jun 2008 16:35:09 -0400, Gene Heskett wrote:

> 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?"

Why option -c?

tr '\r' '\n' <filename  >filename2
would do it.

fedora-list mailing list
[email protected]
To unsubscribe:

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux