done_progress_bar shan’t output a newline; fix from ⮡ tarent
[shellsnippets/shellsnippets.git] / mksh / _remfor
1 #!/bin/mksh
2
3 local _i _fm=$2 _h=$1
4 shift; shift
5
6 trap "" INT
7 ssh "$_h" find "${_fm@Q}" -type f -print0 | sort -R "" | \
8     while IFS= read -r -d "" _i; do
9         print -r "◖${_i}◗"
10         ssh -n "$_h" cat "${_i@Q}" | "$@"
11 done