resource_dir=/tmp/jobs20170711/jobs/*/config.xml
target_dir=/tmp/jobs20170711/bakefilelist=`ls $resource_dir`for file in $filelistdores_file=`echo $file | awk -F "/" '{print $(NF-1)}'`echo $res_fileecho $filecp $file $target_dir$res_file".config.xml"done