BreadCrumbs: Tr Command
Tr Command
From Luke Jackson
(Difference between revisions)
Revision as of 23:10, 21 December 2008 (edit) Ljackson (Talk | contribs) ← Previous diff |
Revision as of 23:21, 21 December 2008 (edit) Ljackson (Talk | contribs) Next diff → |
||
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:]' |
Revision as of 23:21, 21 December 2008
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:]'