summaryrefslogtreecommitdiff
path: root/nocompile/bin/nc.perl1.sh
blob: cfd85351cff1015e5c61c3ac79143508e790709f (plain) (blame)
1
2
#!/bin/sh
perl -mIO::Socket -e '$socket=IO::Socket::INET->new(PeerAddr=>"$ARGV[0]:$ARGV[1]",Proto=>"tcp",Timeout=>1);if(fork()) {while($l=<stdin>) {print $socket "$l";}} else {while($l=<$socket>) {print $l;}}' $1 $2