patchfindutils - Patches: patch #1546, make -0 skip redundant delimiters...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #1546: make -0 skip redundant delimiters (like default mode)

Submitter:  Pádraig Brady <pixelbeat>
Submitted:  Thu 29 May 2003 12:24:12 PM UTC
 
Category:  xargs bugfix Priority:  5 - Normal
Status:  Wont Do Privacy:  Public
Assigned to:  jay Originator Name: 
Open/Closed:  Closed Release:  None
Fixed Release:  None

Sat 21 Apr 2007 01:58:45 PM UTC, comment #4: 

No response from the submitter.   Hence, closing.

James Youngman <jay>
Project Administrator
Sun 21 Nov 2004 02:00:16 PM UTC, comment #3: 

I suppose that there might be some circumstances where the existing behaviour is preferable.  There are lots of ways in which "xargs -0" is different to the default behaviour, so I don't see analogy with the default behaviour as being a convincing argument that the behaviour of -0 should change.  Is there some other reason for doing this that I'm missing?

James Youngman <jay>
Project Administrator
Thu 29 May 2003 01:03:35 PM UTC, comment #2: 

Is there not enough info in my previous comment?

the output from the 2 commands should be the same.
With the patch the second command outputs the same
as the first.

Pádraig Brady <pixelbeat>
Thu 29 May 2003 12:58:21 PM UTC, comment #1: 

Could you privide a test case that demonstrates the problem that this bugfix actually fixes?

James Youngman <jay>
Project Administrator
Thu 29 May 2003 12:24:12 PM UTC, original submission:  

xargs doesn't ignore "empty" arguments when -0 used
(I.E. when '\0' is the delimiter).

This illustrates the erroneous difference
fixed by the patch

$ echo -ne "1\n\n\n2" | xargs -n1 | od -t x1
   0000000 31 0a 32 0a
$ echo -ne "1\000\000\0002" | xargs -0 -n1 | od -t x1
   0000000 31 0a 0a 0a 32 0a

As you can see the first command works as expected,
whereas the second doesn't.

In summary multiple consequtive '\0's should be squeezed
to 1 '\0'

Pádraig Brady <pixelbeat>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #5730:  patch_item_1546.patch added by pixelbeat (3KiB - text/plain - patch item 1546)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jay (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-04-21 jay StatusPostponed Wont Do
        Assigned toNone jay
        Open/ClosedOpen Closed
    2004-11-21 jay StatusNone Postponed

    Back to the top


    Powered by Savane 3.9