aboutsummaryrefslogtreecommitdiff
path: root/bin/netfileput
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-03-18 19:00:09 +0000
committerrsc <devnull@localhost>2005-03-18 19:00:09 +0000
commitf5874be6261edbe5fa48c3343c69b735b317c6d9 (patch)
tree4d35d60929b472e98a04fa9621849f7d8a86fb9e /bin/netfileput
parent3ff8f72ec222c73f3733337d477bedb1481b350a (diff)
downloadplan9port-f5874be6261edbe5fa48c3343c69b735b317c6d9.tar.gz
plan9port-f5874be6261edbe5fa48c3343c69b735b317c6d9.tar.bz2
plan9port-f5874be6261edbe5fa48c3343c69b735b317c6d9.zip
add for netfiles
Diffstat (limited to 'bin/netfileput')
-rwxr-xr-xbin/netfileput15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/netfileput b/bin/netfileput
new file mode 100755
index 00000000..9a5a396d
--- /dev/null
+++ b/bin/netfileput
@@ -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