Make a slow error quine maker!
Bash, 9223372036854775810

Inspired by Doorknob's answer.

a='"2&gt;/dev/null;if(((i=$((i-1)))&gt;0));then $(declare -p a);$a;else 1;fi #"'
i=2**63
eval $a


It should be run with bash &lt; file.sh, or use the same file name for each program, to get rid of the different file names in the error messages.

The first few errors are (with LANG=C):

bash: line 3: 2&gt;/dev/null;if(((i=9223372036854775807)&gt;0));then declare -- a="\"2&gt;/dev/null;if(((i=\$((i-1)))&gt;0));then \$(declare -p a);\$a;else 1;fi #\"";"2&gt;/dev/null;if(((i=$((i-1)))&gt;0));then $(declare -p a);$a;else 1;fi #";else 1;fi #: No such file or directory




bash: line 1: 2&gt;/dev/null;if(((i=9223372036854775806)&gt;0));then declare -- a="\"2&gt;/dev/null;if(((i=\$((i-1)))&gt;0));then \$(declare -p a);\$a;else 1;fi #\"";"2&gt;/dev/null;if(((i=$((i-1)))&gt;0));then $(declare -p a);$a;else 1;fi #";else 1;fi #: No such file or directory




bash: line 1: 2&gt;/dev/null;if(((i=9223372036854775805)&gt;0));then declare -- a="\"2&gt;/dev/null;if(((i=\$((i-1)))&gt;0));then \$(declare -p a);\$a;else 1;fi #\"";"2&gt;/dev/null;if(((i=$((i-1)))&gt;0));then $(declare -p a);$a;else 1;fi #";else 1;fi #: No such file or directory


And finally:

bash: line 1: 2&gt;/dev/null;if(((i=0)&gt;0));then declare -- a="\"2&gt;/dev/null;if(((i=\$((i-1)))&gt;0));then \$(declare -p a);\$a;else 1;fi #\"";"2&gt;/dev/null;if(((i=$((i-1)))&gt;0));then $(declare -p a);$a;else 1;fi #";else 1;fi #: No such file or directory




bash: line 1: 1: command not found




bash: line 1: bash:: command not found


which is an error quine.