diff options
author | rsc <devnull@localhost> | 2005-03-20 23:39:48 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-03-20 23:39:48 +0000 |
commit | baf7825e82bac6f37860c6ebe26a13651fe405fd (patch) | |
tree | 97f5f3e225125d0dd6f4e77e87a90a5fe4ff82f7 /src/cmd/netfiles | |
parent | 80097b018284589b1a3dd8d59549bbf7d3c67e8b (diff) | |
download | plan9port-baf7825e82bac6f37860c6ebe26a13651fe405fd.tar.gz plan9port-baf7825e82bac6f37860c6ebe26a13651fe405fd.tar.bz2 plan9port-baf7825e82bac6f37860c6ebe26a13651fe405fd.zip |
update usage, use sftp -b /dev/stdin
Diffstat (limited to 'src/cmd/netfiles')
-rwxr-xr-x | src/cmd/netfiles/netfileget | 6 | ||||
-rwxr-xr-x | src/cmd/netfiles/netfileput | 4 | ||||
-rwxr-xr-x | src/cmd/netfiles/netfilestat | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/cmd/netfiles/netfileget b/src/cmd/netfiles/netfileget index c621482d..88544f5c 100755 --- a/src/cmd/netfiles/netfileget +++ b/src/cmd/netfiles/netfileget @@ -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 } @@ -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 } @@ -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}' } diff --git a/src/cmd/netfiles/netfileput b/src/cmd/netfiles/netfileput index baa3eb12..7b90124d 100755 --- a/src/cmd/netfiles/netfileput +++ b/src/cmd/netfiles/netfileput @@ -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{ diff --git a/src/cmd/netfiles/netfilestat b/src/cmd/netfiles/netfilestat index 1d687e51..992cac22 100755 --- a/src/cmd/netfiles/netfilestat +++ b/src/cmd/netfiles/netfilestat @@ -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 } @@ -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 |