Dear All,
I have many sub-folders but each of them have a file with same name but different data.
I want to either move or copy them into a new folder but they need to have the path of where they are coming as part of their name...
I have managed to find the files but dont know how to change the name
find . -name output.csv | xargs -I {} cp -iv {} ./results
I have tried the loop but dont face the same problem
find . -name output.csv | while read i
do
name=$(basename $i)
cat $i > ${name}.csv
done
can someone help me plz?