remove \n character from string shell code example Example: bash remove newline from string echo "${string}"|tr '\n' ' '