Remove all words bigger than 6 characters using sed -


i'm new sed , i'm trying figure out way remove words in text more 6 characters.

so far i've come gives me empty file.

sed -n '/.\{6\}/!d' input > output 

input

but sed's ability filter text in pipeline particularly distinguishes other types of editors.

desired output

but sed's text in other types of.

this should trick remove words containing more 6 letters - if define word being made of letters a-z , a-z:

sed -e s'/[a-za-z]\{7,\}//g' 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -