I have files which contain file names pointing to other files. These files contain further file names pointing further files and so on. I need a bash script which follows each files recursively and logs into file every touched file during the run.
file1:
file2
file3
file2:
file4
file3:
file5
file4 and file5 are empty. Result:
file1
file2
file4
file3
file5