I am new to this and trying to iterate over 19,000 files (all in one directory) to insert the corresponding file name at the beginning of each line in each file.
Later, I will combine these files to get a file containing all the data that I need for my analyzes.
The following pattern is displayed in the file names:
V_foo_V_bar
The two parts V_in each file name are permanent. the rest varies.
I tried:
for f in V*; do awk '{print "$f" $} file
I did this with parentheses and without them around $f, and both of them did not work.
Using parentheses, a string is $finserted into the file name. No pastes are inserted.
Help would be greatly appreciated as I already tried a couple of other equally useless ideas and frustrations knocking on my door.
Many thanks.
source
share