shell-script-pt
[Top][All Lists]
Advanced

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

Re: [shell-script] ajuda com grep no solaris


From: André Saunite
Subject: Re: [shell-script] ajuda com grep no solaris
Date: Thu, 24 Apr 2008 18:06:40 -0300

Oi Elvio,

Primeiro eu pensei que talvez o grep do solaris no diretório /usr/xpg4/bin
pudesse ser a solução mas também não funcionou, então resolvi usando o awk:

* awk /GBRT-00033/'{print $0; getline; print $0}' arquivo.log*

Testei assim:

*$ cat a*
ERROR-----BGcustomer.c:1209:24/04/08 13:21:56 > BG-00010: Failed To Bill
Customer 00000000000842797, Account 00000000000614774, attempting rollback
ERROR-----GBRTaddCharges.c:0962:24/04/08 13:21:56 > GBRT-00033: Unable to
find a location identifier associated with an event of event type 23 with
event date/time 07/03/2008 16:20:21.
ERROR-----BGcustomer.c:1209:24/04/08 13:21:56 > BG-00010: Failed To Bill
Customer 00000000000842797, Account 00000000000614774, attempting rollback
ERROR-----BGcustomer.c:1209:24/04/08 13:21:56 > BG-00010: Failed To Bill
Customer 00000000000842797, Account 00000000000614774, attempting rollback
ERROR-----BGcustomer.c:1209:24/04/08 13:21:56 > BG-00010: Failed To Bill
Customer 00000000000842797, Account 00000000000614774, attempting rollback

*$ awk /GBRT-00033/'{print $0; getline; print $0}' a*
ERROR-----GBRTaddCharges.c:0962:24/04/08 13:21:56 > GBRT-00033: Unable to
find a location identifier associated with an event of event type 23 with
event date/time 07/03/2008 16:20:21.
ERROR-----BGcustomer.c:1209:24/04/08 13:21:56 > BG-00010: Failed To Bill
Customer 00000000000842797, Account 00000000000614774, attempting rollback

Abs,
André Saunite


[As partes desta mensagem que não continham texto foram removidas]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]