tr command for shell scripting
NarendraP
Learn How to Automate Common Tasks with Bash Shell Scripting
tr command
tr: short for translate
tr is useful to translate or delete given set of characters from the input.
Syntax:
tr [options] [SET1] [SET2] <inputFile
Some Command | tr [options] [SET1] [SET2]
No Option: For translation
Examples for SET1/SET2: [:lower:], [a-z], [:upper:] [A-Z] , [:digit:] , [0-9], [:space:]
-d : deletes given set of characters.
Learn How to Automate Common Tasks with Bash Shell Scripting
Thank you