Recursive files in bash
I have files containing filenames pointing to other files. These files contain additional filenames that indicate additional files, etc. I need a bash script that follows each file recursively and writes to the file each affected file during the run.
file1:
file2
file3
file2:
file4
file3:
file5
file4 and file5 are empty. Result:
file1
file2
file4
file3
file5
+2
a source to share