If I do this find
:
find ${TRIADS_DIR}/*.dc.results -path "*amblock/stats.*HEAD" -o -path "*amblock/stats.*BRIK"
then I get what I expect in STDOUT:
tp101.day1.dc.results/amblock/stats.tp101_day1+tlrc.HEAD
tp101.day1.dc.results/amblock/stats.tp101_day1+tlrc.BRIK
tp101.day2.dc.results/amblock/stats.tp101_day2+tlrc.HEAD
tp101.day2.dc.results/amblock/stats.tp101_day2+tlrc.BRIK
...
If I add an -exec
clause to link the found files:
find ${TRIADS_DIR}/*.dc.results -path "*amblock/stats.*HEAD" -o -path "*amblock/stats.*BRIK" -exec ln -s {} ${TRIADS_GROUP} \;
then it only links the BRIKs:
stats.tp101_day1+tlrc.BRIK@
stats.tp101_day2+tlrc.BRIK@
...
Questions
- What's happening?
Is there a more efficient way to tell find to return .HEAD and .BRIK using a single wildcard expression? I tried things like:
find ${TRIADS_DIR}/*.dc.results -path "*amblock/stats.*{HEAD,BRIK}"
but couldn't get it to work.