Re: Executing Shell Pipelines with ?find? _-exec?

Liste des GroupesRevenir à cu shell 
Sujet : Re: Executing Shell Pipelines with ?find? _-exec?
De : usenetf24.effweh (at) *nospam* erine.email (Friedhelm Waitzmann)
Groupes : comp.unix.shell comp.os.linux.misc
Suivi-à : comp.unix.shell
Date : 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!

Date Sujet#  Auteur
27 Apr 24 * Executing Shell Pipelines with “find -exec”8Lawrence D'Oliveiro
27 Apr 24 +* Re: Executing Shell Pipelines with “find -exec”6Christian Weisgerber
27 Apr 24 i+* Re: Executing Shell Pipelines with ?find? _-exec?4Robert Heller
27 Apr 24 ii`* Re: Executing Shell Pipelines with ?find? _-exec?3Kaz Kylheku
27 Apr 24 ii `* Re: Executing Shell Pipelines with ?find? _-exec?2Robert Heller
5 May 24 ii  `- Re: Executing Shell Pipelines with ?find? _-exec?1Friedhelm Waitzmann
28 Apr 24 i`- Re: Executing Shell Pipelines with “find -exec”1Lawrence D'Oliveiro
5 May 24 `- Re: Executing Shell Pipelines with “find -exec”1Friedhelm Waitzmann

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal