Following on from a post a long time ago about migrating from HP-UX to RHEL I have found another “gotcha” in relation to the use of the echo command.
In HP-UX you can use terminal codes like \c for continue on same line and \n for new line etc.
In RHEL by default these codes are not interpreted. To get them to be interpreted you need to use “echo -e”
Here is a before and after
echo “Here is\t some\b \n\nembedded code”
Here is\t some\b \n\nembedded code
echo -e “Here is\t some\b \n\nembedded code”
Here is som
embedded code
If you are only use \c codes you could consider removing them and just using echo -n to suppress the new line but I think echo -e is more flexible