Lars,
you have to add the grep command before or behind your command line:
This command will show the last 1000 "new-IP" lines from the log:
grep "new-IP" /clusterfs/coarsp/remedy/db/arerror.log | tail -1000
You also can find "new-IP" lines in the last 1000 log lines:
tail -1000 /clusterfs/coarsp/remedy/db/arerror.log | grep "new-IP"
Best regards,
Joerg
-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:arslist@ARSLIST.ORG]On Behalf Of
lars.j.pettersson@VATTENFALL.COM
Sent: Saturday, March 18, 2006 3:21 PM
To: arslist@ARSLIST.ORG
Subject: Q: Unixhelp ...
Hi, I run this from an ars-form: tail -1000 /clusterfs/coarsp/remedy/db/arerror.log
Returns the last 1000 rows from arerror.log to a charfield. Works fine
Suppose i just want the receive rows containing a specific textstring, like 'new-IP:144.27.58.45 - Override is not allowed'
Can I add this criteria in the same command and just receive those rows?
L ars Pettersson
Vattenfall Business Services Nordic AB
Action Request System Engineer (Tabasco)
S-461 88 Trollhattan
Sweden
Phone +46 520 888 35 Mobil +46 70 608 99 95
e-mail: lars.j.pettersson@vattenfall.com
UNSUBSCRIBE or access ARSlist Archives at http://www.ARSLIST.org
UNSUBSCRIBE or access ARSlist Archives at http://www.ARSLIST.org