[jboss-jira] [JBoss JIRA] (WFCORE-3556) Unexpected output with grep '^no\(fork\|group\)'

Jean-Francois Denise (JIRA) issues at jboss.org
Tue Feb 13 09:27:00 EST 2018


    [ https://issues.jboss.org/browse/WFCORE-3556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13532331#comment-13532331 ] 

Jean-Francois Denise commented on WFCORE-3556:
----------------------------------------------

In order for bash grep command to accept echo nofork | grep '^no(fork|group)' you need to add the -E option, so : echo nofork | grep -E '^no(fork|group)'
Escaping the parenthesis is a syntax item to advertise that this is a group when not using the extended pattern. 
I think that we should keep it as it is, there is no need to escape characters that we don't want to see escaped to comply with a behaviour of grep.


> Unexpected output with grep '^no\(fork\|group\)'
> ------------------------------------------------
>
>                 Key: WFCORE-3556
>                 URL: https://issues.jboss.org/browse/WFCORE-3556
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: CLI
>            Reporter: Katerina Novotna
>            Assignee: Jean-Francois Denise
>
> *Description of problem:*
> Aesh grep command doesn't return expected result. The same command with bash grep gives 'nofork' result.
> *Actual results:*
> [standalone at embedded /] echo nofork | grep '^no\(fork\|group\)'
> [standalone at embedded /] 
> *Expected results:*
> [standalone at embedded /] echo nofork | grep '^no\(fork\|group\)'
> [standalone at embedded /] nofork



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list