|
Re: lug-bg: script...
- Subject: Re: lug-bg: script...
- From: pavel@xxxxxxxxxxxxx (Pavel Cholakov)
- Date: Mon, 17 Jan 2000 18:13:06 +0200
--- add.pl ---
#!/usr/bin/perl
$filename = shift @ARGV or die "podajte ime na fajl";
open(INP, "< $filename");
while (<INP>) {
print;
print "nqkakyw tekst\n" if /regular expression za reda/;
}
close INP;
--- kraj ---
towa chete ot fajl, dokato stigne do red, kojto otgowarq na "regular expression
za reda", sled towa wmykwa "nqkakyw tekst\n" i prodylvawa s originalniq fajl.
ako drug red otgowarq na syshtiq r.e. i sled nego shte byde wmyknat
"nqkakyw tekst\n". edwa li shte swyrshi rabota w tozi si wid, oprawqj se natatyk
... uspeh! :-)
==================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers)
Otpiswaneto RABOTI !!! : Majordomo@xxxxxxxxxxxxxxxxxx UNSUBSCRIBE LUG-BG
http://www.linux-bulgaria.org/ Hosted by Internet Group Ltd. - Stara Zagora
|
|
|