BreadCrumbs: Tr Command

Tr Command

From Luke Jackson

(Difference between revisions)
Jump to: navigation, search
Revision as of 23:10, 21 December 2008 (edit)
Ljackson (Talk | contribs)

← Previous diff
Current revision (10:41, 27 February 2014) (edit)
Ljackson (Talk | contribs)

 
Line 8: Line 8:
cat fontprds.txt | tr -s "\r\n" "," 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"

Current revision

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