grep can match the beginning of a line with the '^' character and the end of a line with the '$' character. Any character is matched by the '.' character, so to match a literal "." you will need to use the escaped '\.' sequence. Thus to match a line beginning with a dot and ending with a dot you would use:
grep '^\..*\.$'
This will match any line that both begins with a dot and ends with a dot, and has any characters in between.
Copyright © 2026 eLLeNow.com All Rights Reserved.