You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Derek Baum (JIRA)" <ji...@apache.org> on 2009/07/13 22:29:14 UTC

[jira] Commented: (FELIX-1356) Piping output from multiple statements on single line should behave similar to how Unix shells handle redirection.

    [ https://issues.apache.org/jira/browse/FELIX-1356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730493#action_12730493 ] 

Derek Baum commented on FELIX-1356:
-----------------------------------

> Seems like in the gogo case the pipe is applied to both statements while in the unix case, the pipe is only applied to the statement the pipe is defined in.

yes, this is as defined in RFC132:

program ::= statements ( '|' statements ) *
statements ::= statement ( ';' statement ) *

so the pipe is defined as connecting groups of statements, separated by ;

However, we could suggest it is redefined to be more Unix like (fewer surprises for those who know Unix).
We could then use parenthesis () to group statement, just as you would in bash:

> (echo hello ; echo hello) | echo world

This would require not using parenthesis to create literal LDAP expressions, as they do at present, as I mentioned in the comment onhttps://issues.apache.org/jira/browse/FELIX-1325

Derek

> Piping output from multiple statements on single line should behave similar to how Unix shells handle redirection.
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1356
>                 URL: https://issues.apache.org/jira/browse/FELIX-1356
>             Project: Felix
>          Issue Type: Improvement
>            Reporter: Hiram Chirino
>
> Use compare the command and result of these unix shell statements:
> $ echo hello ; echo hello | echo world
> hello
> world
> With the gogo equivalent:
> $ echo hello ; echo hello | echo world
> world
> Seems like in the gogo case the pipe is applied to both statements while in the unix case, the pipe is only applied to the statement the pipe is defined in.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.