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/netfileget | |
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/netfileget')
-rwxr-xr-x | src/cmd/netfiles/netfileget | 6 |
1 files changed, 3 insertions, 3 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}' } |