Please Help me!!


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Please Help me!!
# 1  
Old 05-23-2007
Please Help me!!

I'm newbie for shell script now i have a problem to code so I try to grep "Concurrency Violation,Agent is calling clean for resource,became OFFLINE unexpectedly" in /var/adm/messages then print it out by other word on log.txt. Moreover, I need to check about the date(today), time(when the script run).

Last edited by unitipon; 05-23-2007 at 04:42 AM.. Reason: miss some word
# 2  
Old 05-23-2007
Bug Please help me!!

hi,

if u want to grep "Concurrency Violation,Agent is calling clean for resource,became OFFLINE unexpectedly" and put the result ta an another file and also want the date and time then try this

#!/bin/sh
echo `date`
grep 'Concurrency Violation,Agent is calling clean for resource,became OFFLINE unexpectedly' FILENAME >> outfilename.txt

if it not work just replace the single code with double code

Regards,
Pankaj
# 3  
Old 05-23-2007
thank u, it's help me a lot
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question