|< 1 2 >| | 16 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl
while (<STDIN>)
{
if ($_ =~ /send/)
{
{
print "hello world";
}
}
}
tail -f /var/log/mail.log |script.pl
perl -ne "print qq(Hallo Welt\n) if /send/"
root@fuji:/# tail -f /var/log/mgetty.cuaa1|/etc/ppp/script.pl
1
2
3
4
01/24 12:35:41 aa1 waiting for ``OK'' ** found **
01/24 12:35:41 aa1 waiting...
01/24 12:48:52 aa1 wfr: waiting for ``RING''
01/24 12:48:52 aa1 send: ATA[0d]
1
2
3
4
5
6
7
8
9
10
>perl
while (<DATA>) {
print "GEFUNDEN\n" if /send/i;
}
_ _DATA_ _
01/24 12:35:41 aa1 waiting for ``OK'' ** found **
01/24 12:35:41 aa1 waiting...
01/24 12:48:52 aa1 wfr: waiting for ``RING''
01/24 12:48:52 aa1 send: ATA[0d]
GEFUNDEN
tail -f logfile.txt | ./skript.pl
|< 1 2 >| | 16 Einträge, 2 Seiten |