hidden Characters

Hello All,
I'm trying to parse through a file and display all the hidden characters, including all carriage and line returns. I usually use cat -v, but this doesn't display the carriage and line returns. Does anyone know how this can be done?

Thanks
Khoom

od or hexdump or xxd perhaps?

Era, all those help me to view the hidden characters. However in this case I'd also like to insert a newline or a carriage return, that's why I need an editor that will enable me both to view and to edit this file.

Just to clarify things - I have a file with all the lines ending with \n\r when viewed with od -c. However, one line ends with just \n. I'd like to insert the \r character because the file is failing to process because of this missing character.

Presumably you mean \r\n not the other way around.

perl -i~ -pe 's/\r?\n/\r\n/' file

Similar solutions for sed and awk and what not are available; search the forums.

Cheers Era