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

head: negative numbers broken #1414

Closed
E5ten opened this issue Aug 3, 2019 · 3 comments
Closed

head: negative numbers broken #1414

E5ten opened this issue Aug 3, 2019 · 3 comments

Comments

@E5ten
Copy link
Contributor

E5ten commented Aug 3, 2019

head -n -1 with no file argument results in head: error: Argument to option 'n' missing, and with a file argument (e.g. head -n -1 file) results in head: error: invalid line count 'file': invalid digit found in string. head should detect that the -1 isn't an option despite the dash before it, but a negative argument to -n and correctly print all the lines in the file it is used on except the last.

@Arcterus
Copy link
Collaborator

Is -c also an issue?

@E5ten
Copy link
Contributor Author

E5ten commented Jan 28, 2020

Yes

@sylvestre
Copy link
Sponsor Contributor

Fixed by #1510

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

3 participants