A NOTE has been added to this issue. ====================================================================== https://www.austingroupbugs.net/view.php?id=1861 ====================================================================== Reported By: stephane Assigned To: ====================================================================== Project: 1003.1(2024)/Issue8 Issue ID: 1861 Category: Shell and Utilities Type: Error Severity: Objection Priority: normal Status: Interpretation Required Name: Stephane Chazelas Organization: User Reference: Section: xargs utility Page Number: 3601 Line Number: 123207-123214 Interp Status: Proposed Final Accepted Text: https://www.austingroupbugs.net/view.php?id=1861#c6918 ====================================================================== Date Submitted: 2024-10-11 12:32 UTC Last Modified: 2024-10-19 20:56 UTC ====================================================================== Summary: xargs -L broken by https://www.austingroupbugs.net/view.php?id=243 resolution ====================================================================== Relationships ID Summary ---------------------------------------------------------------------- related to 0000243 Add -print0 to "find" ======================================================================
---------------------------------------------------------------------- (0006927) stephane (reporter) - 2024-10-19 20:56 https://www.austingroupbugs.net/view.php?id=1861#c6927 ---------------------------------------------------------------------- GNU's xargs has been documenting that -L (formerly -l) implies -x at least since 3.1 in 1991 which is the oldest version I could find. Even if not documented, FreeBSD and NetBSD's xargs behave like GNU here They both have: if (Iflag || Lflag) xflag = 1; And have had since -L was added there (in 2002 and 2007 respectively). For those where -L doesn't imply -x, in xargs -L "$lines" -s "$size" cmd if the arg list from $lines lines doesn't fit within $size, there's the question of whether cmd is called with arguments from fewer lines, or just fewer arguments, including possibly a subset of the arguments on the last line, and if the latter, for the next run, whether it starts picking arguments from the next line, or from where it left in the unfinished line from the previous run. For instance on an input like: 00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 Would xargs -L2 -s 23 echo + output: + 00001 00002 00003 + 00004 00005 00006 + 00007 00008 00009 + 00010 00011 00012 (using one line when 2 lines don't fit within the 23 byte limit) Or: + 00001 00002 00003 00004 + 00007 00008 00009 00010 (still be line based, but discarding 5, 6, 11, 12) Or: + 00001 00002 00003 00004 + 00005 00006 00007 00008 + 00009 00010 00011 00012 And not be really line based at all. I don't have access to a Solaris machine any longer, so I can't test there. Issue History Date Modified Username Field Change ====================================================================== 2024-10-11 12:32 stephane New Issue 2024-10-11 12:32 stephane Name => Stephane Chazelas 2024-10-11 12:32 stephane Section => xargs utility 2024-10-11 12:32 stephane Page Number => 3601 2024-10-11 12:32 stephane Line Number => 123207-123214 2024-10-11 16:28 stephane Note Added: 0006913 2024-10-12 05:57 stephane Note Added: 0006914 2024-10-14 16:13 geoffclare Note Added: 0006916 2024-10-15 05:09 stephane Note Added: 0006917 2024-10-15 05:23 stephane Note Edited: 0006917 2024-10-17 09:08 geoffclare Note Added: 0006918 2024-10-17 09:12 geoffclare Relationship added related to 0000243 2024-10-17 15:12 geoffclare Note Edited: 0006918 2024-10-17 15:12 geoffclare Interp Status => Pending 2024-10-17 15:12 geoffclare Final Accepted Text => https://www.austingroupbugs.net/view.php?id=1861#c6918 2024-10-17 15:12 geoffclare Status New => Interpretation Required 2024-10-17 15:12 geoffclare Resolution Open => Accepted As Marked 2024-10-17 15:13 geoffclare Tag Attached: tc1-2024 2024-10-17 16:25 agadmin Interp Status Pending => Proposed 2024-10-17 16:25 agadmin Note Added: 0006921 2024-10-18 06:34 stephane Note Added: 0006922 2024-10-18 07:02 stephane Note Added: 0006923 2024-10-18 07:08 stephane Note Added: 0006924 2024-10-18 07:10 stephane Note Edited: 0006924 2024-10-18 08:39 geoffclare Note Added: 0006925 2024-10-18 18:59 stephane Note Edited: 0006922 2024-10-19 20:56 stephane Note Added: 0006927 ======================================================================
