answersLogoWhite

0

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.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How do you locate lines beginning and ending with a dot using sed?

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:


What is the shortest line of longitude?

All lines of longitude are equally long, beginning and ending at the poles.


Lines of latitude locate places in which derations?

Lat rhymes with fat. Lines of latitude go around the world like belts, and locate positions to the north and south.Longitude lines are long. Unlike latitude lines longitude lines are all the same length as they run from pole to pole. The locate positions to the east and west.


Lines used to locate palces on a map which are parallel to the equator?

They are lines of latitude.


Explain any five filters in UNIX system?

head - list beginning lines of a file tail - list ending lines of a file cut - eliminate columns of a file grep - find patterns of matches in files sed - make changes to selected lines in files


What is used to locate points in geometry?

lines and angles


What is true about magnetic field lines but not electric field limes?

Magnetic field lines are closed loops, while electric field lines always start at positive charges and end at negative charges. Additionally, magnetic field lines do not have beginning or end points, unlike electric field lines which have distinct starting and ending points.


How can I locate water lines effectively?

To locate water lines effectively, you can use a ground-penetrating radar, a metal detector, or contact your local utility company for assistance.


I live in an area where there is no phone lines, and I have to utilize free wi-fi in my area. How can I locate internet service where there is no phone lines?

“I live in an area where there is no phone lines, and I have to utilize free wi-fi in my area. How can I locate internet service where there is no phone lines?”


How are longitude and latitude lines used to locate points on earth?

They are used to locate a certain place on a map.


What is imaginary lines that are used to help locate places and objects are called lines of and?

Imaginary lines that are used to help locate places and objects are called lines of latitude and longitude. Lines of latitude run east and west around the Earth, while lines of longitude run north and south from pole to pole.


Can parallel lines touch in the beginning?

No. By definition, lines that are parallel never intersect.