I thought about this, and in the simplest form you have the following:
$ cat clone #! /bin/bash bash -i |tee >(cat >>/tmp/bash.log.$$) # $ vim clone # Vim: Warning: Output is not to a terminal $ ./clone $ du -sb /tmp/bash.log.9609 29 /tmp/bash.log.9609 109 /tmp/bash.log.9609 161 /tmp/bash.log.9609 213 /tmp/bash.log.9609
source share