#!/bin/bash find . -regextype awk -regex "./tmp[0-9]*/(para|seq|notrans).Rds" -exec bash -c 'f=${1#./tmp}; cp -v "$1" "./${f//\//_}"' None {} \;