- April, 2005
-
egrep - searching for more than one pattern at a time
Thanks to egrep for linguists for giving this nice and clear example of using egrep.
There are different ways to match both star and stars within a single search pattern. The most straightforward way might be to tell egrep to look for either the string star or the string stars with the help of a disjunction, expressed with the vertical bar, |. This time the search pattern has to be quoted in order for the program to know where the search pattern starts and ends
$ egrep -w 'star|stars' sonnets.txt Not from the stars do I my judgement pluck, And constant stars in them I read such art Whereon the stars in secret influence comment. Let those who are in favour with their stars, Till whatsoever star that guides my moving,Defined tags for this entry: linux
Page 1 of 1, totaling 1 entries
