Thread Linux-Radiususerfile parsen
(3 answers)
Opened by OnkelBlacky at 2006-03-17 09:24
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; -- |