≡ Menu

tr command

Shell Scripting: Convert Uppercase to Lowercase

I've a small shell script and I would like to convert all incoming user input to lowercase using a shell script. How do I convert uppercase words or strings to a lowercase or vise versa on Unix-like / Linux bash shell?
[click to continue…]

Understanding Linux / UNIX tr command

Q. Can you explain the tr command and how to use it under Linux / UNIX like oses?

A. The tr utility copies the given input to produced the output with substitution or deletion of selected characters. tr abbreviated as translate or transliterate. It takes as parameters two sets of characters, and replaces occurrences of the characters in the first set with the corresponding elements from the other set i.e. it is used to translate characters.
[click to continue…]