Posts Tagged ‘tr’

Need to remove all those ^M characters from a DOS file?

Wednesday, July 4th, 2012

Need to remove all those ^M characters from a DOS file? Try

tr -d \ \r < dosfile > newfile

(No space between two slashes.)

tr – translate or delete characters

Wednesday, July 4th, 2012

Пример изменения текста:

lexus@reinstein:~$ echo lexus
lexus

lexus@reinstein:~$ echo lexus | tr [a-z] [A-Z]
LEXUS

Подробности – в man tr.