Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-B fails with lseek: Invalid argument if it would start before the beginning of the file #16

Open
cirosantilli opened this issue Oct 9, 2023 · 0 comments

Comments

@cirosantilli
Copy link

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
@cirosantilli cirosantilli changed the title -B fail with lseek: Invalid argument if it would start before the beginning of the file -B fails with lseek: Invalid argument if it would start before the beginning of the file Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant