8000 `expr <some string> length` should fail · Issue #5560 · uutils/coreutils · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

expr <some string> length should fail #5560

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

Closed
cakebaker opened this issue Nov 20, 2023 · 1 comment · Fixed by #5566
Closed

expr <some string> length should fail #5560

cakebaker opened this issue Nov 20, 2023 · 1 comment · Fixed by #5566
Labels

Comments

@cakebaker
Copy link
Contributor

When running $ expr helloworld length, GNU expr fails with:

expr: syntax error: unexpected argument ‘length’

uutils expr, on the other hand, incorrectly returns 10, the length of the string helloworld.

@Luv-Ray
Copy link
Contributor
Luv-Ray commented Nov 21, 2023

Similar errors with index and substr:
GNU:

$ expr aaa index a
expr: syntax error: unexpected argument ‘index’
$ expr abcd substr 1 2  
expr: syntax error: unexpected argument ‘substr’

uutils:

$ ./target/debug/expr aaa index a
1
$ ./target/debug/expr abcd substr 1 2
ab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0