|
From: Marc P. <li...@xo...> - 2010-11-15 14:39:09
|
On Nov 15, 2010, at 8:12 AM, Ales Rikovsky wrote: > I know. It's stored in /var/log/nagios/archives/xxxxx.log > > But I'm not hunger for rewriting the tons of files manually. > Can anyone help me with the script or something like that, maybe if it > could ask for old and new names and rewrites all occurences in the log > liles correctly. > ______ > .... > Enter the old name: blahblahold > Enter the new name: blahblahnew It could be something as simple as -- sed -i .bak 's/blahblahold/blahblanew/g' /var/log/nagios/archives/*.log I leave how to pass the 'blahblahold' and 'blahblahnew' as a rather straighforward exercise for you. -- Marc |