Skip to content

error "command not found" due to return code in double quotes #11

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
zerobikappa opened this issue Feb 6, 2022 · 3 comments
Closed

Comments

@zerobikappa
Copy link
Contributor

error due to place the return code in double quotes

"$(file "$i" | grep -v ELF --silent)" && echo "Ignoring non ELF file: $i" && continue

"$(file "$i" | grep -v ELF --silent)" && echo "Ignoring non ELF file: $i" && continue

should be

$(file "$i" | grep -v ELF --silent) && echo "Ignoring non ELF file: $i" && continue
@TheAssassin
Copy link
Member

Actually, it should be (file "$i" | grep -v ELF --silent) && echo "Ignoring non ELF file: $i" && continue. The leading $ will capture the subshell's output into a string, that's why it doesn't work.

Please send a PR.

@zerobikappa
Copy link
Contributor Author

after I submitted PR, I found someone already did the same thing(#6) 1 year ago. but the PR was still pending in queue till now...

@zerobikappa
Copy link
Contributor Author

#13

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

2 participants