LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Please give a help to create a script (https://www.linuxquestions.org/questions/linux-kernel-70/please-give-a-help-to-create-a-script-719690/)

sharp859 04-16-2009 06:11 PM

Please give a help to create a script
 
Hi Linux Masters,

I need a shell script which should generate

kernel.info to -/var/log/kernel_info.log


Some of our machines has

kernel info defined in this file

vi /etc/syslog.conf

(

# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* -/var/log/kernel
daemon.* /var/log/daemon
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;*.!warn;auth,authpriv,kern,mail.none -/var/log/messages
)

Some dont

So I need a script which should look etc/syslog.conf and add

kern.* -/var/log/kernel


Or any other best way to solve this.

Thanks!

unSpawn 04-16-2009 07:24 PM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread should be closed because it is a duplicate.


All times are GMT -5. The time now is 12:23 AM.