Eduardo wrote:
> I trying to search a phrase than start with 'a' and ends at 'b, middle
> anything,
> but if i use the command as '$ grep '^a * b$' like in the man, don't works,

Your pattern includes " * " which would look for zero or more spaces
followed by a single space.  This could also be described as one or
more spaces.  But you say you want it to match anything and not just
spaces.  So you would want to use ".*" instead.  The '.' matches any
character and the '*' says zero or more of the previous any character.

Try this:

  grep '^a.*b$'

Bob


Reply via email to