I am required to find all lines that start with a capital letter AND ends with the word dog followed by a period.
I know that to find lines starting with a capital letter I would do: egrep ^[A-Z] filename
And to find lines that end with "dog." I would do: egrep dog.$ filename
However how would I do them both together? I have tried: egrep ^[A-Z]*dog.$ filename
but it does not seem to work. In filename substitution the * character represented a string of any length, or no string at all even.