I want to be able to get the commands, stderr, and stdout for a sequence of commands I run, so that I could edit it and then copy-paste it to mailing lists, bugs, whatever. E.g., optimally it would pipe to a file (as I ran things):
$ mkdir temp
$ cd temp
$ touch file1 file2
$ cat > file1 <<EOF
$ cat file1
$ # etc.
Anyone got a handy script to do this, or is there anything built-in?
script(1) utility do what you want?