Here is the beginning of a file:
# hexdump -n 550 myFile
0000000 f0f2 f5f0 f7f9 f1f1 f1f0 f0f0 e3f1 f3c8
0000010 f3f5 0000 0000 000c 0000 0000 0000 000c
0000020 0000 0c00 0000 0000 0000 0c00 0000 0000
0000030 000c 0000 0000 0000 000c 0000 0c00 0000
0000040 0000 0000 0c00 0000 0000 000c 0000 0000
0000050 0000 000c 0000 0c00 0000 0000 0000 0c00
0000060 0000 0000 000c 0000 0000 0000 000c 0000
*
00000b0 0000 0000 000c 0000 0000 0000 0000 0000
00000c0 0000 0000 0000 0c00 0000 0000 0000 0c00
00000d0 0000 0000 000c 0000 0000 0000 000c 0000
00000e0 0c00 0000 0000 0000 0c00 0000 0000 000c
00000f0 0000 0000 0000 000c 0000 0c00 0000 0000
0000100 0000 0c00 0000 0000 000c 0000 0000 0000
0000110 000c 0000 0c00 0000 0000 0000 0c00 0000
0000120 0000 0000 0c00 0000 0000 0000 0c00 0000
*
0000160 0000 0000 0c00 0000 0000 0000 0000 0000
0000170 0000 0000 0000 0000 000c 0000 0000 0000
0000180 000c 0000 0c00 0000 0000 0000 0c00 0000
0000190 0000 000c 0000 0000 0000 000c 0000 0c00
00001a0 0000 0000 0000 0c00 0000 0000 000c 0000
00001b0 0000 0000 000c 0000 0c00 0000 0000 0000
00001c0 0c00 0000 0000 000c 0000 0000 0000 000c
00001d0 0000 0000 0000 000c 0000 0000 0000 000c
*
0000210 0000 0000 0000 000c 0000 0000 0000 0000
0000220 0000 0000 0a00
0000226
in which we can see the hex values 0c and 0a
I don't understand why grep finds 0c but not 0a:
# grep -P '\x0c' myFile
Fichier binaire myFile correspondant
# grep -P '\x0a' myFile
<nothing in the output>
I am using CentOS.