Hi, it comes to me that there is a better way to make the redirection via "tee" less ugly in the code. It does not depend on the assumption that the log file path is a single word.
First define in the script: # Shell function which lets "tee" consume its standard input my_log() { tee -i -a "$HOME/my_logfile" } Then use it in the same script like echo "Block count: "$blocks | my_log Have a nice day :) Thomas