Gene Heskett wrote:
When the man page says that the -c option causes tr to first complement SET1, another way to say it is that using -c will cause a matche to everything but SET1.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.
The reason file I/O in not covered is that tr is normally a filter, so you would use in a pipe between two other programs. It takes what comes in from stdin, does its thing, and sends it to stdout. This is common among filter programs. Another thing common among filter programs is that they will not have any opening message, and will send errors to stderr.
Mikkel -- Do not meddle in the affairs of dragons, for thou art crunchy and taste good with Ketchup!
Attachment:
signature.asc
Description: OpenPGP digital signature
-- fedora-list mailing list fedora-list@xxxxxxxxxx To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list