| if(</dev/null dial 'unix!'^$ns/$1 >[2]/dev/null) |
| t=/tmp/netfilexxx.$pid.$USER |
| fn sigexit { rm -f $t $t.* } |
| if(! </dev/null dial 'unix!'^$ns/$1.sftp >[2]/dev/null){ |
| sftpcache -D $1 </dev/null >[1=2] |
| if(! </dev/null dial 'unix!'^$ns/$1.sftp >[2]/dev/null){ |
| sed 's/^/-/' | sftp -b /dev/stdin $1 && echo DONE |
| {cat; echo DONE} | dial -e 'unix!'^$ns/$1.sftp |
| if(! 9 grep -s '^DONE$' $t.sftp1){ |
| echo sftp did not finish: >[1=2] |
| sed 's/^/ /g' $t.sftp1 >[1=2] |
| if(~ $eflag yes && test -s $t.sftp){ |
| echo sftp error output: >[1=2] |
| sed '/^DONE$/d; s/^/ /g' $t.sftp1 >[1=2] |