shithub: x

ref: 17ecec63f2109a344a2e610668017c5af5f9914d
dir: x/run

View raw version
#!/bin/rc
rfork e
flags=()
while(~ $1 -* && ! ~ $1 --){
	flags=($flags $1)
	shift
}
if(~ $1 --)
	shift

{
	echo cd `{x/path -P}
	if(! grep -s '/dev/cons' /fd/0ctl)
		cat
	if not
		echo $"*
}| ssh $flags `{x/path -l}