I want to do the following through the terminal. I have a file with many lines, each line containing a whole sentence. Some lines are empty. I want to read the file and extract all words that end with .abc. I want to do this through the terminal. How might I do that?
terminal extrac words ending with ".abc" from file
1.2k Views Asked by Katedral Pillon At
4
grepcan be very usefullWhat it does
-oprints the string in the line which match the regex given\b[^\.]*\.abc\bregex matches any word wich ends with.abc\bword boundary[^\.]anything other than a.*matches zero or more\.abc\bmatches.abcfollowed by word boundary\bNote
If the word can contain more than one
.then modify the regex as\b.*\.abc\bwhere
.*would match anything including.