I have many .txt files with their filenames being different dates:
01.01.2010.txt
02.01.2010.txt
...
Currently each file (e.g.: 01.01.2010.txt) looks like this:
0.351 XXX XXX XXX XXX
0.292 XXX XXX XXX XXX
How do I add the filename to each line of the file and keep the format?
... so it looks like this, for file 01.01.2010.txt:
01.01.2010 0.341 XXX XXX XXX XXX
01.01.2010 0.122 XXX XXX XXX XXX
.. and looks like this, for file 02.01.2010.txt:
02.01.2010 0.391 XXX XXX XXX XXX
02.01.2010 1.342 XXX XXX XXX XXX
These files are stored in subdirectories. If there is a one-liner that can process all of them and also the subdirectories, it would be awesome.
- /patch/to/file
-/path/to/file/sub1/
-/path/to/file/sub2/
-/path/to/file/sub3/