diff --git a/qq2clone b/qq2clone index 629a35e..1f0102a 100755 --- a/qq2clone +++ b/qq2clone @@ -105,20 +105,21 @@ write_pipe () # OUTPUT: None # PARAMETERS: $1: '0' if passing another parameter(s), '1' if writing to # stdin instead. -# $2 and on: If $1 is 0, this is the information write_pipe will -# write as "$*" +# $2 and on: If $1 is 0, write_pipe will write the remaining parameters #=========================================================================# { # We put a + at the beginning of every line to let read_pipe work in a # non-blocking manner -if (($1)); then local line +if (($1)); then while IFS= read -r line; do echo "+$line" >&3 done else shift - echo "+$*" >&3 + echo "$@" | while IFS= read -r line; do + echo "+$line" >&3 + done fi return 0 }