how to remove blankspaces from text file with linux code example Example: how to remove all space in file cat file.txt | tr -d " \t\n\r"