BreadCrumbs: Tr Command

Tr Command

From Luke Jackson

Jump to: navigation, search

Examples

Convert tab delimited data into comma delimited:

tr '\t' ',' <input_file> <output_file>

Replace "New Line Character" (Return) with comma:

cat fontprds.txt | tr -s "\r\n" ","

Convert string from upper case to lower case:

tr '[:upper:]' '[:lower:]'

Convert Windows Line Break to Unix

tr -d "\r"
Personal tools