Tr

Build a list of unique words in a file
tr ' ' \\n < notes20191108.txt | sort | uniq

Build a sorted list of the unique words in a text file
tr ' ' \\n < gettysburg.txt | sort | uniq | awk '{printf "%s ",$0} END {print ""}'

Make a file lowercase
cat FILE1.TXT | tr '[A-Z]' '[a-z]' > FILE2.TXT

Make all filenames in a directory lowercase
for x in `ls` do if [ ! -f $x ]; then continue fi lc=`echo $x | tr '[A-Z]' '[a-z]'` if [ $lc != $x ]; then mv -i $x $lc fi done
 * 1) !/bin/bash

Make a new file of the individual words in another file
tr ' ' '\012' OUTFILE''

Convert text files from MS-DOS format to UNIX format
tr -d '\r' mule.txt

Convert WordStar files to plain text

 * cat rubymae.ws | tr -c '[:print:]\t\r\n' '[ *]' >rubymae.txt


 * tr -cd "[:print:]" < d6

Make the text in a file all uppercase
cat testa.txt | tr '[a-z]' '[A-Z]' > testb.txt

Perform a ROT 13 conversion
#!/bin/sh echo "$1" | tr '[A-Za-z]' '[N-ZA-Mn-za-m]'

Remove punctuation
tr -d '[:punct:]' < reply-words.txt > reply-words2.txt

Strip carriage returns from a DOS file
tr -d '\015' OUTFILE

Make null-delimited proc data more readable
cat /proc/self/environ | tr \\000 \\n