Don't use the back slash, and use single quotes to force all the expression
to go to egrep directiy

-pete happy HOT 4th

On Sat, Jul 4, 2015 at 7:09 PM, Rich Shepard <[email protected]>
wrote:

>    I have an 851 line data file in which certain lines begin with P
> followed
> by 5 digits. I want to count the number of those lines. Despite reading the
> grep man page I am missing the correct syntax.
>
>    The expression
>         egrep -cE "^P[[:digit:]]\{5\}" hrwq.dat
> returns a count of zero (0). So do variations of options and search
> strings.
>
>    What have I missed here?
>
> Happy 4th, all,
>
> Rich
> _______________________________________________
> PLUG mailing list
> [email protected]
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to