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

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -