Re: editing log files at post

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan Horne:
>    unfortunately i dont know anything about awk and sed (which is pitiful
> ...
>    would  anyone be able to help me with an example that would do this at
>    the  post of my kickstart, instead of just appending the 'compress' at
>    the bottom/end of file?

Jonathan,                                                                       
                                                                                
At "post" time, perl should be available, you could try a one-liner.            
                                                                                
Have a look at /etc/logrotate.d/syslog -- if it's the files                     
mentioned in there, it might be an option to just put your                      
"compress" directive in there. As an example, with perl you could:              
                                                                                
perl -pi -e 's#endscript#endscript\n\tcompress#;' /etc/logrotate.d/syslog       
                                                                                
or something similar, which might do the trick.                                 
                                                                                
Hope it helps!                                                                  
-Harold

--Harold 

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list


[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux