You can ask head
to read a number of bytes. For your particular case:
$ head -c 8 <file>
Or in a variable:
foo=$(head -c 8 <file>)
You can ask head
to read a number of bytes. For your particular case:
$ head -c 8 <file>
Or in a variable:
foo=$(head -c 8 <file>)