Daily Archives: 19 November 2011


Bash: tr: A couple of usefull applications

(How) to delete all instances of a character from a file:
The following example deletes all instances of the character ‘v’

cat someFile | tr -d v

(How) to replace all instances of a character with another:
The following example replaces all space characters with the new line character

cat someFile | tr ' ' '\n'