predate.sh linux error logging

C++
( myscript.sh 3>&1 1>&2- 2>&3- ) | ./predate.sh >error.log
Source

Also in C++: