Re: cat and grep without destroying file



(``-_-´´) -- 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"


--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users