Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
The problem statement, all variables and given/known data:
find out lines in a given file consisting of the following pattern BCAA, BCAAA, BCAAAA, BCAAAAA, BCAAAAAA
Relevant commands, code, scripts, algorithms:
grep BC(A)\{2,6} filename
The attempts at a solution (include all code and scripts):
bash: syntax error near unexpected token `('
Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
BITS-pilani, Hyderabad,India, B.V. Prasad babu, System programming
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
You don't need to escape {. It has special meaning in an extended regular expression. By escaping it, it loses its meaning. If you do, then escape the closing }.
Otherwise use egrep or grep -E (without the \ before {).
If 6 is the maximum number of "A"'s after "BC", then you need to define that in your regular expression ({2,6} doesn't mean there can't be a 7th, or more, consecutive "A").