ultibuzz has asked for the wisdom of the Perl Monks concerning the following question:
as u might see im quit new to perl
i want to make a script that looks every 30 mins in a file and when the last line and yes only the last line contain some special text it shoud copy 10 lines above + last line in a separate file
but i dont have a clue how to say that the apttern amtching only looks @ the last line and then to get 10 lines up in the file and print out from there to the end
i think i can manage it with some kind of array and counter but i have realy no clue
for any help links sugestions and so on i say thx
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pattern matching only last line of a file and then copy 10 lines above till end
by holli (Abbot) on Oct 20, 2005 at 15:31 UTC | |
|
Re: pattern matching only last line of a file and then copy 10 lines above till end
by philcrow (Priest) on Oct 20, 2005 at 15:26 UTC | |
by holli (Abbot) on Oct 20, 2005 at 15:58 UTC | |
|
Re: pattern matching only last line of a file and then copy 10 lines above till end
by emilper (Novice) on Oct 20, 2005 at 15:47 UTC | |
|
Re: pattern matching only last line of a file and then copy 10 lines above till end
by saskaqueer (Friar) on Oct 20, 2005 at 15:57 UTC | |
|
Re: pattern matching only last line of a file and then copy 10 lines above till end
by ultibuzz (Monk) on Oct 20, 2005 at 23:02 UTC |