read parts of binary files by "ranges"

i read the "cat" manpages,
but i could not find to tell it like

"read file XY.BIN from byte 1000 to byte 5000"

can somebody please point me into the right direction?

cat would be the ideal tool for my purpose, the way it behaves, but i miss this ranges option.

thanks for any input.

# cat file1
1234567890

dd skip=3 bs=1 count=5 if=file1 of=file2

# cat file2
45678#

In your case:
skip=999
count=4000

thanks man,

your solution is not really what i need, cause it should be performance optimized, creating a second file is no good choice,

but you brought me to the DD command :):):):slight_smile:

i totally did not think of that one..

big thanks!!