How to do thing like dd if=somefile bs=1 skip=1337 count=31337000, but efficiently, not using not 1-byte reads and writes?
The solution is expected:
- To be simple (for non-simple I can write some Perl oneliner that will do this)
- To support large offsets and lengths (so hacks with block size in dd won't help)
Partial solution (not simple enough, trying the same with length will make it even more complex):
dd if=somefile bs=1000 skip=1 count=31337 | { dd bs=337 count=1 of=/dev/null; rest_of_pipeline; }
# 1337 div 1000 and 1337 mod 1000
