plan9port/src/cmd/netfiles/netfileput

24 lines
253 B
Text
Raw Normal View History

2005-03-18 19:30:22 +00:00
#!/usr/local/plan9/bin/rc
if(! ~ $#* 2){
2005-03-20 23:39:48 +00:00
echo 'usage: netfileput system path' >[1=2]
2005-03-18 19:30:22 +00:00
exit usage
}
f=putfile
2005-03-21 07:37:34 +00:00
. netfilelib.rc $1
2005-03-18 19:30:22 +00:00
fn putfile{
cat >$t
2005-03-24 05:17:01 +00:00
echo put $t $2 | runsftp -e $1
2005-03-18 19:30:22 +00:00
}
fn putfile9p{
if(! 9p write $1/$2)
exit 1
}
$f $1 $2
exit 0
2005-03-21 07:37:34 +00:00