The command 'tr' stands for 'translate'. It is used to translate, like from lowercase to uppercase and vice versa or new lines into spaces.
The 'tr' command can change case.
Look at the above snapshot, all p,r,c,u are converted into upprecase P,R,C,U.
Remove New Lines
To write all the lines into a single line we have to translate all new lines into spaces.
Look at the above snapshot, command "cat jtp.txt | tr -s 'l'" has squeezed all the letters 'l' into one and command "cat spaces.txt | tr -s ' '" has squeezed all the spaces into single space.
Look at the above snapshot, all the letters are encrypted according to the command. But letter 'A' and 'M' are not encrypted as they are in upper case.
Look at the above snapshot, all the 'o' letters are deleted from the file 'exm.txt'.