answersLogoWhite

0


Best Answer

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

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you locate lines beginning and ending with a dot using grep and sed commad?
Write your answer...
Submit
Still have questions?
magnify glass
imp
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.


What is used to locate points in geometry?

lines and angles


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.


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


Are latitude and longitude lines used to locate places?

East And West(:


What reference lines are used to locate points on earth?

Latitude and Longitude


Can parallel lines touch in the beginning?

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


Is ending an adjective?

Yes it can be (ending lines, ending date).The word ending is the present participle of the verb "to end" and can be a verb, or an adjective, or a noun (gerund).