Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Us old UNIX guys would likely go for cut for this sort of task:

     cut -d " " -f1-2,4-5 file.txt
where file.txt is:

     one two three four five
and the return is:

     one two four five


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: