File: status.pl

package info (click to toggle)
fastd 23-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,912 kB
  • sloc: ansic: 11,311; asm: 3,734; yacc: 601; sh: 472; makefile: 160; python: 35; perl: 11
file content (17 lines) | stat: -rwxr-xr-x 298 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl -w

use strict;

use IO::Socket::UNIX qw( SOCK_STREAM );

$ARGV[0] or die("Usage: status.pl <socket>\n");

my $socket = IO::Socket::UNIX->new(
   Type => SOCK_STREAM,
   Peer => $ARGV[0],
)
   or die("Can't connect to server: $!\n");

foreach my $line (<$socket>) {
	print $line;
}