[
https://issues.jboss.org/browse/WFCORE-3556?page=com.atlassian.jira.plugi...
]
Marek Marusic edited comment on WFCORE-3556 at 2/12/18 7:30 AM:
----------------------------------------------------------------
It looks like the problem is caused because of the escape characters.
I tried it with *grep command in linux bash* environment :
$ echo nofork | grep '^no(fork|group)' #no output, since characters (|) are not
escaped.
$ echo nofork | grep '^no\(fork\|group\)' #finds the
match, since characters (|) are escaped.
nofork
And then I tried it with the *grep* command from *aesh-extensions* the behaviour is
exactly opposite:
\[aesh@extensions\] $ echo nofork | grep
'^no\(fork\|group\)' #no match
\[aesh@extensions\] $ echo nofork | grep '^no(fork|group)' #finds a match
nofork
Do you [~kanovotn] [~jdenise] think this is wrong behaviour and the grep from
aesh-extensions should behave exactly the same as the bash and therefore it should expect
the escaped regex *'^no\(fork\|group\)'* ?
was (Author: mmarusic):
It looks like the problem is caused because of the escape characters.
I tried it with *grep command in linux bash* environment :
$ echo nofork | grep '^no(fork|group)' #no output, since characters (|) are not
escaped.
$ echo nofork | grep '^no\(fork\|group\)' #finds the
match, since characters (|) are escaped.
nofork
And then I tried it with the *grep* command from *aesh-extensions* the behaviour is
exactly opposite:
\[aesh@extensions\] $ echo nofork | grep
'^no\(fork\|group\)' #no match
\[aesh@extensions\] $ echo nofork | grep '^no(fork|group)' #finds a match
nofork
Do you [~kanovotn] [~jdenise] think this is wrong behaviour and the grep from
aesh-extensions should behave exactly the same as the bash and therefore it should expect
the escaped regex *'^no\(fork\|group\)'* ?
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@embedded /] echo nofork | grep '^no\(fork\|group\)'
[standalone@embedded /]
*Expected results:*
[standalone@embedded /] echo nofork | grep '^no\(fork\|group\)'
[standalone@embedded /] nofork
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)