Thread Linux-Radiususerfile parsen (3 answers)
Opened by OnkelBlacky at 2006-03-17 09:24

OnkelBlacky
 2006-03-17 11:34
#63854 #63854
User since
2004-08-20
16 Artikel
BenutzerIn
[default_avatar]
habs selber jetzt gerade die Lösung

Trotzdem vielen Dank an die community

--
#!/usr/bin/perl

use strict;
use warnings;

my $file = '/path/to/file.txt';
open(my $fh,"<",$file) or die $!;
while(my $line = <$fh>){
if($line =~ /Called-Station-Id/){
my $userid = (split(/\s+/,$line))[0];
print $userid;
}
}
close $fh;
--

View full thread Linux-Radiususerfile parsen