I intend to find *.lsf
following the current /subdirectories
and execute bsub<*.lsf
for all the find files.
I tried:
find ./ -type f -name "*.lsf" -exec bsub < \;
The part find ./ -type f -name "*.lsf"
works fine. However, the execute part has problems.
Can anyone helps figure out?
<
and it right hand side operator, will be evaluated before the programs are executed. – ctrl-alt-delor Jun 19 '20 at 15:58bsub
does, you can probably leave the<
. – Jona Engel Jun 19 '20 at 17:54xargs -I {}
tells xargs to replace the string{}
with what it gets from standard input. In this case stdin is the pipe|
. Which redirects the standard output fromfind
. TThe replacement string does not have to be{}
, it can be anything you chose.{}
is just common. This is all in the man pages – Jona Engel Jun 19 '20 at 18:05