linux - Grep capping size of results lines, for multiple grep phrases? -


i grepping terms this:

grep 'term1\|term2\|term3\|term4' 

and want say, lines found, cap results 100 characters. found examples how when searching 1 term, none accommodating or-ing of search terms.

try gnu grep:

grep -e 'term1|term2|term3|term4' file | grep -oe '^.{100}' 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -