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 ------------------------------------------------------------------------------ Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null