The program should start out with 2 separate files, here named "a" and "b". "a" and "b" should be what I am calling inverse quines: "a", when run, should output "b"'s source code, and "b", when run, should output "a"'s source code, for example:
./a
#source code of b, optionally followed by newlines
./b
#source code of a, optionally followed by newlines
If the outputs of "a" and "b" are then appended to the same file, here called "c", such as this:
touch c
./a >> c
./b >> c
The resulting file, "c", when run, should output the code of "a", followed by a newline, followed by the source code of "b" and a newline. The full running of these files should go as follows:
touch c
./a >> c
./b >> c
./c
#source code of a \n
#source code of b \n
Any coding languages can be used, and as this is code golf, the source code should be as small as possible.
There are no limits on what the source code of "a" and "b" can be, and newlines can be placed freely at the end of code outputs, such that the output ends in a single or a string of newlines.
a
andb
are identical? \$\endgroup\$a
alone outputs source ofb
and a newline, and vice versa? \$\endgroup\$