Sujet : Re: Executing Shell Pipelines with ?find? _-exec?
De : usenetf24.effweh (at) *nospam* erine.email (Friedhelm Waitzmann)
Groupes : comp.unix.shell comp.os.linux.miscSuivi-à : comp.unix.shellDate : 05. May 2024, 02:12:51
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <j13jgk-p2u.ln1@foechtelwenk.news.arcor.de>
References : 1 2 3 4 5
Robert Heller <
heller@deepsoft.com>:
The '-n 1' tells xargs to run the command given to xargs with only one file at
a time. There is no need for the "for x in "$@"; do...".
find . -name '*.blend' -print0 | xargs -0 -n 1 'sh [ $(blendfile_version "$1" | \
jq -r .version ) -gt 304 ] && printf "%s\n" "$1"'
You mean:
find . -name '*.blend' -print0 | xargs -0 -n 1 sh -c '[ $(blendfile_version "$1" | \
jq -r .version ) -gt 304 ] && printf "%s\n" "$1"' sh
Followup-To!