Code: Select all
# echo -n $'Hello\nWorld' | tr -s '\r\n' '\x01'
Hello0World# tr --version
tr (GNU coreutils) 8.22
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Jim Meyering.
# echo -n $'Hello\nWorld' | busybox tr -s '\r\n' '\x01'
HelloWorld#