[GLLUG] using sed
Ben Pfaff
blp@cs.stanford.edu
30 Jan 2003 14:48:02 -0800
Matt Graham <danceswithcrows@usa.net> writes:
> perl -pe 's/GLcore/glx/g' < XF86Config > XF86Config.temp
> mv XF86Config.temp XF86Config
You are working too hard. There is a Perl feature designed for
this kind of thing:
perl -pi.bak -e 's/GLcore/glx/g;' XF86Config
(Your suggestion is better if the file needs to be replaced
atomically.)
--
"Writing non-free software is not an ethically legitimate activity, so if
people who do this run into trouble, that's good! All businesses based
on non-free software ought to fail, and the sooner the better."
--Richard Stallman