I need to find every line in a file where compare a name of a different big
list(in another file).I need every line in a new file.Please help me!
_
Scarica GRATUITAMENTE MSN Explorer dall'indirizzo
http://explorer.msn.it/intl.asp.
You might need to supply some more details, but if everything in your "big
list" is unique, you could (untested code by the way!)
my %list;
open(OUT, $outfile) || die "cannot open $outfile: $!";
open(LIST, $listfile) || die "cannot open $listfile: $!";
while()
{
my $line = $_;
chomp $lin
The list is in a file called "france" and contains users name like:
miko
martha
The file to control is the /etc/passwd:
miko:Sn83kdmcsd4ee:816:1005:MirceaKovari:/tmp:/bin/selfa
nikol:Sn83kdmcsd4ee:816:1005:NiklaOlman:/tmp:/bin/selfa
I need to put in a new file the line of user
"miko"(miko:Sn8
Ok, how about this (again untested code!)
my %list;
my $listfile = 'france';
my $outfile = 'output';
my $file = '/etc/passwd';
open(OUT, ">$outfile") || die "cannot open $outfile: $!";
open(LIST, $listfile) || die "cannot open $listfile: $!";
while()
{
my $line = $_;
chomp $line;
$li
on 4/30/02 4:28 AM, [EMAIL PROTECTED] purportedly said:
> The list is in a file called "france" and contains users name like:
>
> miko
> martha
>
> The file to control is the /etc/passwd:
>
> miko:Sn83kdmcsd4ee:816:1005:MirceaKovari:/tmp:/bin/selfa
> nikol:Sn83kdmcsd4ee:816:1005:NiklaOlman:/tm
JD,
Could you please explain the last 2 lines for me?
>$_ = q(
>Apr 21 01:03:01 pandora ipop3d[28245]: Login user=holy00
>Apr 21 01:03:01 pandora ipop3d[28245]: Login user=holy01
>Apr 21 01:03:01 pandora ipop3d[28245]: Login user=holy05
>Apr 21 01:03:01 pandora ipop3d[28245]: Login user=holy01
>A