#133778 - 03/18/06 02:24 AM
Re: Q: Unixhelp ...
|
journeyman
Registered: 07/20/05
Posts: 152
|
** tail -1000 /clusterfs/coarsp/remedy/db/arerror.log | grep "144.24.58.45"
On 3/18/06, lars.j.pettersson@vattenfall.com wrote:
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 Trollhättan 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
-- Frank Caruso Specific Integration, Inc. Senior Remedy Engineer www.specificintegration.com 703-879-6465 20060125This posting was submitted with HTML in it
|
|
Top
|
|
|
|
|
#133779 - 03/18/06 02:35 AM
Re: Q: Unixhelp ...
[Re: smeedjg]
|
Pooh-Bah
Registered: 06/12/01
Posts: 1888
|
** Frank! Thanks works! - is it also possible to select rows between two dates, not tail in this case, just all rows created in the arerror.log between 2006-03-01 - 2006 -03-15 L ars
-----Original Message----- From: Action Request System discussion list(ARSList) [mailto:arslist@ARSLIST.ORG]On Behalf Of Frank Caruso Sent: Saturday, March 18, 2006 3:24 PM To: arslist@ARSLIST.ORG Subject: Re: Q: Unixhelp ... ** tail -1000 /clusterfs/coarsp/remedy/db/arerror.log | grep "144.24.58.45" On 3/18/06, lars.j.pettersson@vattenfall.com wrote:
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 Trollhättan 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
-- Frank Caruso Specific Integration, Inc. Senior Remedy Engineer www.specificintegration.com 703-879-6465 20060125This posting was submitted with HTML in it
20060125This posting was submitted with HTML in it
|
|
Top
|
|
|
|
|
#133780 - 03/18/06 02:41 AM
Re: Q: Unixhelp ...
[Re: smeedjg]
|
journeyman
Registered: 07/20/05
Posts: 152
|
** Yes I am sure it is possible but I would probably take the file and port it to XL and do the work there. Not having a UNIX machine handy I cannot do much testing now.
Good luck.
On 3/18/06, lars.j.pettersson@vattenfall.com wrote:
** Frank! Thanks works! - is it also possible to select rows between two dates, not tail in this case, just all rows created in the arerror.log between 2006-03-01 - 2006 -03-15 L ars
-----Original Message----- From: Action Request System discussion list(ARSList) [mailto:arslist@ARSLIST.ORG]On Behalf Of Frank Caruso Sent: Saturday, March 18, 2006 3:24 PM To: arslist@ARSLIST.ORG Subject: Re: Q: Unixhelp ... ** tail -1000 /clusterfs/coarsp/remedy/db/arerror.log | grep "144.24.58.45" On 3/18/06, lars.j.pettersson@vattenfall.com wrote:
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 Trollhättan 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
-- Frank Caruso Specific Integration, Inc. Senior Remedy Engineer www.specificintegration.com 703-879-6465 20060125This posting was submitted with HTML in it 20060125This posting was submitted with HTML in it
-- Frank Caruso Specific Integration, Inc. Senior Remedy Engineer www.specificintegration.com 703-879-6465 20060125This posting was submitted with HTML in it
|
|
Top
|
|
|
|
|
#133781 - 03/18/06 03:44 AM
Re: Q: Unixhelp ...
[Re: smeedjg]
|
old hand
Registered: 06/28/04
Posts: 736
|
** Lars, Try tail -1000 /clusterfs/coarsp/remedy/db/arerror.log | grep new-IP:144.27.58.45 That should narrow your output... Joe D'Souza Remedy Developer / Consultant, Shyle Networks, New Jersey.
lars.j.pettersson@VATTENFALL.COM wrote:
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 Trollhättan Sweden Phone +46 520 888 35 Mobil +46 70 608 99 95 e-mail: lars.j.pettersson@vattenfall.com
Yahoo! Travel Find great deals to the top 10 hottest destinations! 20060125This posting was submitted with HTML in it
|
|
Top
|
|
|
|
|
#133782 - 03/18/06 03:47 AM
Re: Q: Unixhelp ...
[Re: smeedjg]
|
old hand
Registered: 06/28/04
Posts: 736
|
** No you cannot do that - the arrerror.log file is a flat file, with little or no dbms property, so you cannot really select stuff with an DB like intelligent query like that.. Joe D'Souza Remedy Developer / Consultant, Shyle Networks, New Jersey.
lars.j.pettersson@VATTENFALL.COM wrote:
** Frank! Thanks works! - is it also possible to select rows between two dates, not tail in this case, just all rows created in the arerror.log between 2006-03-01 - 2006 -03-15 L ars
-----Original Message----- From: Action Request System discussion list(ARSList) [mailto:arslist@ARSLIST.ORG]On Behalf Of Frank Caruso Sent: Saturday, March 18, 2006 3:24 PM To: arslist@ARSLIST.ORG Subject: Re: Q: Unixhelp ... ** tail -1000 /clusterfs/coarsp/remedy/db/arerror.log | grep "144.24.58.45 " On 3/18/06, lars.j.pettersson@vattenfall.com wrote:
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 Trollhättan 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
-- Frank Caruso Specific Integration, Inc. Senior Remedy Engineer www.specificintegration.com 703-879-6465 20060125
Yahoo! Mail Bring photos to life! New PhotoMail makes sharing a breeze.
Yahoo! Mail Bring photos to life! New PhotoMail makes sharing a breeze. 20060125This posting was submitted with HTML in it
|
|
Top
|
|
|
|
|
#133783 - 03/18/06 02:24 AM
Re: Q: Unixhelp ...
[Re: smeedjg]
|
journeyman
Registered: 07/20/05
Posts: 152
|
** ** tail -1000 /clusterfs/coarsp/remedy/db/arerror.log | grep "144.24.58.45"
On 3/18/06, lars.j.pettersson@vattenfall.com wrote:
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 Trollhättan 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
-- Frank Caruso Specific Integration, Inc. Senior Remedy Engineer www.specificintegration.com 703-879-6465 20060125This posting was submitted with HTML in it 20060125This posting was submitted with HTML in it
|
|
Top
|
|
|
|
|
#133784 - 03/18/06 02:41 AM
Re: Q: Unixhelp ...
[Re: smeedjg]
|
journeyman
Registered: 07/20/05
Posts: 152
|
** ** Yes I am sure it is possible but I would probably take the file and port it to XL and do the work there. Not having a UNIX machine handy I cannot do much testing now.
Good luck.
On 3/18/06, lars.j.pettersson@vattenfall.com wrote:
** Frank! Thanks works! - is it also possible to select rows between two dates, not tail in this case, just all rows created in the arerror.log between 2006-03-01 - 2006 -03-15 L ars
-----Original Message----- From: Action Request System discussion list(ARSList) [mailto:arslist@ARSLIST.ORG]On Behalf Of Frank Caruso Sent: Saturday, March 18, 2006 3:24 PM To: arslist@ARSLIST.ORG Subject: Re: Q: Unixhelp ... ** tail -1000 /clusterfs/coarsp/remedy/db/arerrorlog | grep "144.24.58.45" On 3/18/06, lars.j.pettersson@vattenfall.com wrote:
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 Trollhättan 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
-- Frank Caruso Specific Integration, Inc. Senior Remedy Engineer www.specificintegration.com 703-879-6465 20060125This posting was submitted with HTML in it 20060125This posting was submitted with HTML in it
-- Frank Caruso Specific Integration, Inc. Senior Remedy Engineer www.specificintegration.com 703-879-6465 20060125This posting was submitted with HTML in it 20060125This posting was submitted with HTML in it
|
|
Top
|
|
|
|
|
#133785 - 03/18/06 04:22 AM
Re: Q: Unixhelp ...
[Re: smeedjg]
|
old hand
Registered: 03/22/05
Posts: 738
|
On 3/18/06, Joe DeSouza wrote: > ** > No you cannot do that - the arrerror.log file is a flat file, with little or > no dbms property, so you cannot really select stuff with an DB like > intelligent query like that.. > > Joe D'Souza > Remedy Developer / Consultant, > Shyle Networks, > New Jersey. > > lars.j.pettersson@VATTENFALL.COM wrote: > ** > Frank! Thanks works! - is it also possible to select rows between two dates, > not tail in this case, just all rows created in the arerror.log between > 2006-03-01 - 2006 -03-15 > > L ars > -----Original Message----- > From: Action Request System discussion list(ARSList) > [mailto:arslist@ARSLIST.ORG]On Behalf Of Frank Caruso > Sent: Saturday, March 18, 2006 3:24 PM > To: arslist@ARSLIST.ORG > Subject: Re: Q: Unixhelp ... > > ** tail -1000 /clusterfs/coarsp/remedy/db/arerror.log | > grep "144.24.58.45" > -- > Frank Caruso > Specific Integration, Inc. > Senior Remedy Engineer > www.specificintegration.com > 703-879-6465 20060125 > > On 3/18/06, lars.j.pettersson@vattenfall.com > wrote: > > 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
L ars:
This should give you what you are looking for:
cat /clusterfs/coarsp/remedy/db/arerror.log | grep "new-IP:144.27.58.45" |grep "Mar "[01-15]
The regular expression capabilities available in unix are very powerful.
See http://www.openbsd.org/cgi-bin/man.cgi?query=reformat fo
These should apply to most if not all flavors of grep, egrep, fgrep, zgrep, zegrep, zfgrep and the likes per IEEE Std 1003.1-2004.
Axton Grams
UNSUBSCRIBE or access ARSlist Archives at http://www.ARSLIST.org
|
|
Top
|
|
|
|
|
#133786 - 03/19/06 09:33 PM
Re: Q: Unixhelp ...
[Re: smeedjg]
|
journeyman
Registered: 04/20/04
Posts: 84
|
** Lars, you can find out the line number where your date string appears first with the grep -n "2006-03-01" filename | head -1 (or the last one with grep -n "2006-03-15" filename | tail -1 ) command. Then you can use sed -n '4,9p' filename | grep "new-IP" to only search between the fourth and nineth line of the file. Replace "4" and "9" with you grep-command results. 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:35 PM To: arslist@ARSLIST.ORG Subject: Re: Q: Unixhelp ... ** Frank! Thanks works! - is it also possible to select rows between two dates, not tail in this case, just all rows created in the arerror.log between 2006-03-01 - 2006 -03-15 L ars
-----Original Message----- From: Action Request System discussion list(ARSList) [mailto:arslist@ARSLIST.ORG]On Behalf Of Frank Caruso Sent: Saturday, March 18, 2006 3:24 PM To: arslist@ARSLIST.ORG Subject: Re: Q: Unixhelp ... ** tail -1000 /clusterfs/coarsp/remedy/db/arerror.log | grep "144.24.58.45" On 3/18/06, lars.j.pettersson@vattenfall.com wrote:
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 Trollhättan 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
-- Frank Caruso Specific Integration, Inc. Senior Remedy Engineer www.specificintegration.com 703-879-6465 20060125This posting was submitted with HTML in it
20060125This posting was submitted with HTML in it
20060125This posting was submitted with HTML in it
|
|
Top
|
|
|
|
|
|
|