Remove range of words with sed -
i'm trying remove range of words in unix command line sed file , can't figure out. example, how can remove words @ positions 2-4? if file contains: "this file created me." want be: "this created me." lot!
try gnu sed (to print word 1 , word 5 last word):
echo "this file created me." | sed 'y/ /\n/' | sed -n '1p;5,$p' | sed 'n;n;n;y/\n/ /' output:
created me.
Comments
Post a Comment