On Tuesday 09 December 2008 09:18:26 David C. Rankin wrote:
Listmates,
I haven't been able to find an easy way to make edits to multiple files from the command line without doing:
(sed or tr) -> tmpfile -> mv tmpfile original file.
What I'm looking for is a fast way to for is a fast way to edit an existing file directly and change one or two parameter. An example would be to edit all files in /etc/zypp/repo.d and change the keeppackages=0 to keeppackages=1 or something similar without having to use the copy and move, or having to edit the files one by one. Is there a way to do it?
-- David C. Rankin, J.D.,P.E. | openSoftware und SystemEntwicklung Rankin Law Firm, PLLC | Countdown for openSuSE 11.1 www.rankinlawfirm.com | http://counter.opensuse.org/11.1/small
sed has a switch for editing files in place: sed -i -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org