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

when using the -x option, is there any way to print the current file before showing the output associated? #959

Closed
stephane-archer opened this issue Feb 10, 2022 · 2 comments
Labels

Comments

@stephane-archer
Copy link
Contributor

stephane-archer commented Feb 10, 2022

I do the following
fd -x my command -i {} -o out.tmp
I have some output but I have no idea to what file these input are link to
is there any way to print the current file before showing the output associated?
something similar to xargs -t

@tavianator
Copy link
Collaborator

See #943

@Flimm
Copy link

Flimm commented Aug 15, 2024

You can use xargs, like this:

 fd pattern -0 | xargs -0 -I {} sh -c 'echo {}; custom-command {}'

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

No branches or pull requests

4 participants