I wanted to prepend the output (progress) of rclone with custom text. After some googling I've come up with this solution:
rclone sync "$SOURCE" "$DESTINATION" | while read line; do echo " $line"; done But actually rclone (with --progress) grabs some lines at start and then just updates them during its execution. But using while I end up with constant adding new lines instead of updating old ones. Does anybody know how to fix it ?
Default rclone --progress output, it is updated every second:
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA - Checks: 97 / 97, 100% Elapsed time: 0.0s Desired output:
[My text] Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA - [My text] Checks: 97 / 97, 100% [My text] Elapsed time: 0.0s Actual result with while, it does NOT update, it adds instead:
[My text] Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA - [My text] Checks: 97 / 97, 100% [My text] Elapsed time: 0.0s [My text] Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA - [My text] Checks: 97 / 97, 100% [My text] Elapsed time: 0.0s [My text] Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA - [My text] Checks: 97 / 97, 100% [My text] Elapsed time: 0.0s [My text] Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA - [My text] Checks: 97 / 97, 100% [My text] Elapsed time: 0.0s