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

Fix: xargs was breaking mid find search due to files with quotes on filename #1098

Closed
wants to merge 1 commit into from

Conversation

lrdass
Copy link

@lrdass lrdass commented Dec 13, 2023

Issue: #1097

What it does:
Now any file name searched by find, with scape characters ' or " will print it's full name and passed down to xargs.

@lrdass lrdass changed the title Changed find -printf to support file names with any filename Fix: xargs was breaking mid search due to files with quotes on filename Dec 13, 2023
@lrdass lrdass changed the title Fix: xargs was breaking mid search due to files with quotes on filename Fix: xargs was breaking mid find search due to files with quotes on filename Dec 13, 2023
@yump
Copy link
Contributor

yump commented Dec 18, 2023

Is there a reason for not using find -print0 | xargs -0? That is the standard solution to this class of problem.

P.S. grep has -Z for the same purpose, which I think is probably necessary here.

@mrnerdhair
Copy link
Contributor

I submitted #1102 with the -print0 approach. For reference, I am a dummy and did not even realize this PR existed at the time, or I would have suggested changes here instead. Still, though, I think the -print0 mechanism is the better solution to this problem.

@lrdass
Copy link
Author

lrdass commented Dec 26, 2023

Hey guys! I appreciate you guys input! if #1102 closes this, I can close this pr then. Thank you guys for the reply!

@89luca89
Copy link
Owner

89luca89 commented Feb 1, 2024

Thanks @lrdass

Will continue with the #1102 PR then

@89luca89 89luca89 closed this Feb 1, 2024
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

Successfully merging this pull request may close these issues.

4 participants