tupdate usage, use sftp -b /dev/stdin - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit baf7825e82bac6f37860c6ebe26a13651fe405fd
(DIR) parent 80097b018284589b1a3dd8d59549bbf7d3c67e8b
(HTM) Author: rsc <devnull@localhost>
Date: Sun, 20 Mar 2005 23:39:48 +0000
update usage, use sftp -b /dev/stdin
Diffstat:
M src/cmd/netfiles/netfileget | 6 +++---
M src/cmd/netfiles/netfileput | 4 ++--
M src/cmd/netfiles/netfilestat | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
---
(DIR) diff --git a/src/cmd/netfiles/netfileget b/src/cmd/netfiles/netfileget
t@@ -7,7 +7,7 @@ if(~ $1 -d){
}
if(! ~ $#* 2){
- echo 'usage: netget [-d] system path' >[1=2]
+ echo 'usage: netfileget [-d] system path' >[1=2]
exit usage
}
t@@ -20,7 +20,7 @@ fn sigexit { rm -f $t }
fn getfile {
rm -f $t
- if(! echo get $2 $t | sftp -b - $1 >/dev/null)
+ if(! echo get $2 $t | sftp -b /dev/stdin $1 >/dev/null)
exit 1
cat $t
}
t@@ -31,7 +31,7 @@ fn getfile9p {
}
fn getdir {
- if(! {echo cd $2; echo ls -l} | sftp -b - $1 | sed '1,2d; s/sftp> //g; /^$/d' >$t)
+ if(! {echo cd $2; echo ls -l} | sftp -b /dev/stdin $1 | sed '1,2d; s/sftp> //g; /^$/d' >$t)
exit 1
cat $t | awk '$NF == "." || $NF == ".." { next } {s = $NF; if($0 ~ /^d/) s = s "/"; print s}'
}
(DIR) diff --git a/src/cmd/netfiles/netfileput b/src/cmd/netfiles/netfileput
t@@ -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
}
t@@ -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{
(DIR) diff --git a/src/cmd/netfiles/netfilestat b/src/cmd/netfiles/netfilestat
t@@ -1,7 +1,7 @@
#!/usr/local/plan9/bin/rc
if(! ~ $#* 2){
- echo usage: netisdir system path >[1=2]
+ echo usage: netfilestat system path >[1=2]
exit usage
}
t@@ -18,7 +18,7 @@ fn dostat {
echo !echo XXX connected
echo cd $2
echo !echo XXX directory exists
- } | sftp -b - $1 >$t >[2=1]
+ } | sftp -b /dev/stdin $1 >$t >[2=1]
if(9 grep -s XXX.directory.exists $t){
echo directory
exit 0