I'm trying to append text files together with there file names, then split them apart.
I have been able to append files together using tail, but unsure whether this is the best method.
MacBook-Pro:test torn$ ls
file1 file2 file3 file4
MacBook-Pro:test torn$ cat *
this is file 1
this is file 2
this is file 3
this is file 4
MacBook-Pro:test torn$ tail -n +1 * > allFiles
MacBook-Pro:test torn$ cat allFiles
==> file1 <==
this is file 1
==> file2 <==
this is file 2
==> file3 <==
this is file 3
==> file4 <==
this is file 4
MacBook-Pro:test torn$
How can I split allFiles back into the original files?