shithub: bin.rc

ref: 32dae5e4a11c5d7876ce45d221930f84d37e83e2
dir: /bin/recv/

View raw version
#!/bin/rc
fn usage {
	>[2=1] echo 'recv port [file]'
	exit usage
}
port=$1
if(~ $#port 0)
	usage
file=$2
if(~ $#file 0)
	file=/fd/1
>[9=1] >[9]$file aux/listen1 -t tcp!*!$port rc -c '/bin/cat >[1=9]'