I am trying to get the grasp of linux commandline, but this problem I just can't solve.
I would like to merge multiple folders, possibly containing files that may cause duplicate names, into one. To prevent dupes, I would like to have part of the map structure prepended to the file names. At least, that seemed the most obvious solution. So I would like:
./map1/a.dat ~> ./map1_a.dat
./map1/b.dat ~> ./map1_b.dat
./map2/a.dat ~> ./map2_a.dat (no duplicate filename
and trivially: ./a.dat -> ./a.dat
and so on, for all maps within ./ .
How should i go about this?