commas to newlines
cat file.txt | tr , "\n"
wipe all whitespace including newlines
cat file.txt | tr -d " \t\n\r"
remove spaces
cat file.txt | tr -d "[:space:]"
or
cat file.txt | tr -d " "
in order to wipe just horizontal white space
cat file.txt | tr -d "[:blank:]"