Mit grep, um das nächste WORT nach einem Spiel in jeder Linie

Möchte ich, um die "BEKOMMEN" Abfragen aus meiner server-logs.

Dies ist ein Beispiel für den server-log -

1.0.0.127.in-addr.arpa - - [10/Jun/2012 15:32:27] code 404, message File not fo$
1.0.0.127.in-addr.arpa - - [10/Jun/2012 15:32:27] "GET /hello HTTP/1.1" 404 -   
1.0.0.127.in-addr.arpa - - [10/Jun/2012 15:41:57] code 404, message File not fo$
1.0.0.127.in-addr.arpa - - [10/Jun/2012 15:41:57] "GET /ss HTTP/1.1" 404 -

Wenn ich versuche mit einfachen grep oder awk,

Adi:~ adi$ awk '/GET/, /HTTP/' serverlogs.txt

gibt es

1.0.0.127.in-addr.arpa - - [10/Jun/2012 15:32:27] "GET /hello HTTP/1.1" 404 -
1.0.0.127.in-addr.arpa - - [10/Jun/2012 15:41:57] "GET /ss HTTP/1.1" 404 -

Ich will nur anzeigen : Hallo und ss

Gibt es eine Möglichkeit dies getan werden könnte?

InformationsquelleAutor aditya.gupta | 2012-06-10
Schreibe einen Kommentar