4 examples for tr

{{ score }}
  # Replaces all newlines with spaces in the file 'foo'
tr '\n' ' ' < foo > foo
        
{{ score }}
  # Squeeze whitespace (space, tab, and unicode whitestuff) into a single blank
tr -s '[:blank:]' ' '
        
{{ score }}
  # Convert FOO to lowercase
echo FOO | tr '[:upper:]' '[:lower:]'
        
{{ score }}
  # change all non-alphanumeric characters to spaces
tr -c '[:alnum:]' ' '