FreeDOS help system (hhstndrd 1.0.8 en)[trch]

Command: trch

TRCH converts all instances of one character to another. This is really useful if you need to convert a text file between UNIX (end of line is "^J") and DOS (end of line is "^M^J" or "\n").


trch c1 c2 < file > file < file = input file > file = output file


c1 character1, e.g. 'A' c2 character2, e.g. 'B'


TRCH supports NLS (national language support).


trch ^I * < test.txt > test2.txt Replaces tabs with '*' trch e X < test.txt > test3.txt Replaces 'e' with 'X' trch \n $ < test.txt > test4.txt Replaces end of line ('\n') with '$*' trch ^J ^M^J < unix.txt > dos.txt Replaces Unix to DOS format trch \n ^J < dos.txt > unix.txt Replaces DOS to Unix format

See also:

- nowhere - ------------------------------------------------------------------------------ Copyright (C) 2008 W. Spiegl. This file is derived from the FreeDOS Spec Command HOWTO. See the file H2Cpying for copying conditions.