Un petit mémo sur la commande hexdump, très commode pour visualiser les caractères non affichables dans une chaine ou un fichier, mais dont la syntaxe est quelque peu rébarbative.
echo -e "ligne1\nligne2"|hexdump -v -e '"x" 1/1 "%02X" " "' x6C x69 x67 x6E x65 x31 x0A x6C x69 x67 x6E x65 x32 x0A |
En plus mémorisable il y a ça aussi :
echo -e "ligne1\nligne2"|hexdump -v -C 00000000 6c 69 67 6e 65 31 0a 6c 69 67 6e 65 32 0a |ligne1.ligne2.| 0000000e |
Liens
La manpage (courage!)
Manual on How to Use the Hexdump Unix Utility