cat and grep without destroying file

Mihamina (R12y) Rakotomandimby mihamina.rakotomandimby at etu.univ-orleans.fr
Sun Sep 30 14:32:37 UTC 2007


(``-_-´´) -- Fernando wrote:

> #for i in $(/bin/ls -1); do cat $i | egrep -v ^Date > $i.new; mv $i.new $i; done

Use "sed -i".
try a google search with "sed inline replace"





More information about the ubuntu-users mailing list