add for netfiles
This commit is contained in:
parent
3ff8f72ec2
commit
f5874be626
3 changed files with 77 additions and 0 deletions
15
bin/netfileput
Executable file
15
bin/netfileput
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/local/plan9/bin/rc
|
||||
|
||||
whatis '*'
|
||||
if(! ~ $#* 2){
|
||||
echo 'usage: netput system path' >[1=2]
|
||||
exit usage
|
||||
}
|
||||
|
||||
t=/tmp/netget.$pid.$USER
|
||||
fn sigexit { rm -f $t }
|
||||
|
||||
cat >$t
|
||||
if(! echo put $t $2 | sftp -b - $1 >/dev/null)
|
||||
exit 1
|
||||
exit 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue