update usage, use sftp -b /dev/stdin

This commit is contained in:
rsc 2005-03-20 23:39:48 +00:00
parent 80097b0182
commit baf7825e82
3 changed files with 7 additions and 7 deletions

View file

@ -1,7 +1,7 @@
#!/usr/local/plan9/bin/rc
if(! ~ $#* 2){
echo 'usage: netput system path' >[1=2]
echo 'usage: netfileput system path' >[1=2]
exit usage
}
@ -15,7 +15,7 @@ fn sigexit { rm -f $t }
fn putfile{
cat >$t
if(! echo put $t $2 | sftp -b - $1 >/dev/null)
if(! echo put $t $2 | sftp -b /dev/stdin $1 >/dev/null)
exit 1
}
fn putfile9p{