how to write the command??
I tried find . -name test.bash | xargs bash dd, this threw an error bash: xx: No such file or directory
I also tried find . -name test.bash | xargs bash -c, can't work too.
I created a test script, super simple, it just prints the arguments.
#!/bin/bash
echo "$@"
Then I find it in it's directory and call it with arguments:
find . -name test.bash -exec {} arg1 arg2 \;
It runs and outputs "arg1 arg2".
bash script-name arg1 arg2 ...... argn. If it is in another directory then that directory should be in$PATH, it should be executable, and it should have a#!line.find . -name test.bashdoes it find anything?xargswith the-t(AKA--verbose) option. This will make xargs print out the command and argument it runs. man7.org/linux/man-pages/man1/xargs.1.html