Re: [ LUGOS ] grep, awk, sed, co.?

2000-01-24 Прати разговор Matic
Matic wrote: Iz neke datoteke s tekstom bi rad dobil vrstico ki vsebuje "Besedo" + sledeih n vrstic. Kako in s im? lp, Matic -- Chemist who falls in acid is absorbed in work. Oh... man grep grep -A n pattern file Matic -- Chemist who falls in acid is absorbed in work.

Re: [ LUGOS ] grep, awk, sed, co.?

2000-01-24 Прати разговор Stojan Rancic
On Mon, 24 Jan 2000 18:12:28 +, Matic wrote: Iz neke datoteke s tekstom bi rad dobil vrstico ki vsebuje "Besedo" + slede ih n vrstic. Kako in s im? grep -An Beseda * GreetZ, Stojan

Re: [ LUGOS ] grep, awk, sed, co.?

2000-01-24 Прати разговор Borut Mrak
On Mon, Jan 24, 2000 at 06:12:28PM +, Matic wrote: Iz neke datoteke s tekstom bi rad dobil vrstico ki vsebuje "Besedo" + sledeih n vrstic. Kako in s im? Verjetno se da to lepse narediti z awkom. Ampak ker awka ne poznam in sem vajen razmisljati v perlu naredim takole: #!/usr/bin/perl

RE: [ LUGOS ] grep, awk, sed, co.?

2000-01-24 Прати разговор Tha MASTER
Iz neke datoteke s tekstom bi rad dobil vrstico ki vsebuje "Besedo" + sledeèih n vrstic. Kako in s èim? man grep: -A NUM, --after-context=NUM Print NUM lines of trailing context after matching lines. Torej grep -A n "Beseda" filename