Fail on findings, while continuing and printing output #1438
Unanswered
katexochen
asked this question in
Q&A
Replies: 1 comment 4 replies
-
There is a way to delay an error to the end of execution with $ find -name '*err*' -print -exec false {} +
./src/error.rs
./target/release/build/anyhow-50b078fd38fb554c/stderr
...
$ echo $?
1 Actually now that I think of it, you can do the same thing with $ fd err -X printf '%s\n' {} \; -X false {} \;
./src/error.rs
./target/release/build/jemalloc-sys-45a83dd636cff359/stderr
...
$ echo $?
1 |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A common situation I find myself in is using fd for writing some check, i.e. in CI. For such jobs, I'd like to exit with an error code if I have a match. However, I also would like to get all matches and the output printed. I couldn't find a nice way of doing this with other commands yet, any ideas?
Beta Was this translation helpful? Give feedback.
All reactions