You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2018/08/28 07:49:00 UTC

[jira] [Commented] (KARAF-5881) shell:sort does not sort correctly

    [ https://issues.apache.org/jira/browse/KARAF-5881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16594666#comment-16594666 ] 

Guillaume Nodet commented on KARAF-5881:
----------------------------------------

It seems to work for me, could you be more explicit ?

Running the following:
{code}
echo "a3|b3|c3|d3|e3|f3|g3|h3
a1|b1|c1|d1|e1|f1|g1|h1
a0|b0|c0|d0|e0|f0|g0|h0
a2|b2|c2|d2|e2|f2|g2|h2
" | sort -b --field-separator='|' --key=7
{code}
gives
{code}
a0|b0|c0|d0|e0|f0|g0|h0
a1|b1|c1|d1|e1|f1|g1|h1
a2|b2|c2|d2|e2|f2|g2|h2
a3|b3|c3|d3|e3|f3|g3|h3
{code}

> shell:sort does not sort correctly
> ----------------------------------
>
>                 Key: KARAF-5881
>                 URL: https://issues.apache.org/jira/browse/KARAF-5881
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 4.0.10
>            Reporter: Klaus Kapp
>            Assignee: Guillaume Nodet
>            Priority: Major
>
> sort -b --field-separator='|' --key=7
> does not sort correctly
>  
> I have a list with multiple fields separated by pipe ("|"). I want to sort by 7th field but sort does not what it should. If i write the output into a file and sort it in linux's bash it sorts correctly.
> So it seems to be a bug in shell:sort.
> I also tried sorting by other fields, which also doesn't work correctly.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)