[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: Busybox `xargs -I`- ignore empty lines
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2020-09-29 22:03:45
Message-ID: CAK1hOcMQNuQDRQVyLKUjrK4MQFcwv3cs+pMchqfG0KtTS3QdXQ () mail ! gmail ! com
[Download RAW message or body]

Thanks for the bug report. Fixed in a bit different way.
Please try current git,

On Wed, Sep 23, 2020 at 11:46 AM Franciszek Koltuniuk
<franciszek.koltuniuk@consult.red> wrote:
>
> Hi All,
>  Please find in attachment a new patch that replace a fix for a bug :
>
> "echo -n | xargs -I% echo %" would SEG
>
> Commit:
> https://git.busybox.net/busybox/commit/findutils/xargs.c?id=6d777b75ed322ea5ef0d1674ddfee1b5713cb04f
>
> Currently available solution fixes SEGV issue, but the execution of
> 'xargs -I' behavior is different than the xargs from (GNU findutils).
>
> Please see the example:
> ~$ cat ~/tmp/xargs-test
> --- start file xargs-test ---
>
> line number 2
>
> line number 4
>
>
> --- end file xargs-test ---
>
> * output from xargs (GNU findutils) 4.7.0:
>
> ~$ cat ~/tmp/xargs-test | /usr/bin/xargs -I % echo %
> line number 2
> line number 4
> ~$
>
> * output xargs from BusyBox v1.30.1 (Ubuntu 1:1.30.1-4ubuntu6.1)
> multi-call binary):
>
> ~$ cat ~/tmp/xargs-test | busybox xargs -I % echo %echo %
> ~$
>
> I thing that xargs from GNY findutils is expected. The patch:
>  0001-busybox-xargs-I-ignore-empty-lines.patch
> remove the changes within the commit
> 6d777b75ed322ea5ef0d1674ddfee1b5713cb04f and introduce new behavior -
> empty lines are ignored.
>
> Regards,
>  Franciszek
>
> --
> Franciszek Koltuniuk
> w:      consult.red <https://consult.red>
> e:      franciszek.koltuniuk@consult.red
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic