bgrep
bgrep copied to clipboard
`-B` fails with `lseek: Invalid argument` if it would start before the beginning of the file
Would be better to just start from 0 instead in that case:
printf '\x01\x02\x03' > tmp
Good:
bgrep -B2 03 tmp
output:
tmp: 00000002
\x01\x02
Bad:
bgrep -B3 03 tmp
output:
tmp: 00000002
lseek: Invalid argument