Re: IFS=$'\n'

Liste des GroupesRevenir à cu shell 
Sujet : Re: IFS=$'\n'
De : rwspam (at) *nospam* gmx.de (Ralf Damaschke)
Groupes : comp.unix.shell
Date : 14. Aug 2024, 23:55:40
Autres entêtes
Organisation : C.H.A.O.S.
Message-ID : <pan$2d437$c79a548c$945396fd$527603cd@y2plugh.fqdn.th-h.de>
References : 1 2 3 4
User-Agent : Pan/0.144 (Time is the enemy; 28ab3ba git.gnome.org/pan2)
Christian Weisgerber wrote:

If sufficiently many files accrue, find(1) will invoke ls(1) several
times, which will not produce the expected result.  That may be unlikely
in this specific example, but it can happen in the general case.
 
Wait, you say, xargs(1) will also split its input across multiple
invocations.  I mean, that's very much the point of xargs.  Which is why
Helmut added the -x flag, which is supposed to prevent this behavior.

I see the point, but I hope I never meet a use case that says
"do something with the files found, but throw the list away if it can't
be done all at once". I would rather first assemble the list, try to execute
the command with it and if needed switch to some different approach of
handling the files.

Date Sujet#  Auteur
13 Aug 24 * IFS=$'\n'8Lawrence D'Oliveiro
13 Aug 24 `* Re: IFS=$'\n'7Helmut Waitzmann
13 Aug 24  `* Re: IFS=$'\n'6Ralf Damaschke
14 Aug 24   +- Re: IFS=$'\n'1Lawrence D'Oliveiro
14 Aug 24   `* Re: IFS=$'\n'4Christian Weisgerber
15 Aug 24    +* Re: IFS=$'\n'2Ralf Damaschke
15 Aug 24    i`- Re: IFS=$'\n'1Ed Morton
15 Aug 24    `- xargs -x (was: IFS=$'\n')1Geoff Clare

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal