File: ask-liquidsoap.pl

package info (click to toggle)
liquidsoap 1.1.1-7
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,536 kB
  • ctags: 4,416
  • sloc: ml: 34,126; python: 956; makefile: 633; sh: 487; perl: 258; lisp: 62; ansic: 43; ruby: 8
file content (12 lines) | stat: -rwxr-xr-x 290 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/perl -w

use strict ;
use Net::Telnet ;

my $telnet = new Net::Telnet ( Timeout=>10, Errmode=>'die', Port=>1234) ;
$telnet->open('localhost') ;

die "Usage: $0 <command>\n" unless @ARGV ;
$telnet->print($ARGV[0]) ;
my ($output,$end) = $telnet->waitfor('/END$/') ;
print $output;