Skip to main content
added 15 characters in body
Source Link
Snake
  • 1.8k
  • 1
  • 9
  • 19

Enable the globstar Bash shell option: shopt -s globstar

Now change directory into B and run:

for ipath in **/; do
    [ -d "<A-dir>/$i"$path" ] && cp "$i-n "$path/"*.build "<A-dir>/$i"$path"
done

This will recursively check each subdirectory in B and see if there is an equivalent subdirectory in A. If there is then it will copy all .build files from the B subdirectory over to A.

Enable the globstar Bash shell option: shopt -s globstar

Now change directory into B and run:

for i in **/; do
    [ -d "<A-dir>/$i" ] && cp "$i/"*.build "<A-dir>/$i"
done

This will recursively check each subdirectory in B and see if there is an equivalent subdirectory in A. If there is then it will copy all .build files from the B subdirectory over to A.

Enable the globstar Bash shell option: shopt -s globstar

Now change directory into B and run:

for path in **/; do
    [ -d "<A-dir>/$path" ] && cp -n "$path/"*.build "<A-dir>/$path"
done

This will recursively check each subdirectory in B and see if there is an equivalent subdirectory in A. If there is then it will copy all .build files from the B subdirectory over to A.

Source Link
Snake
  • 1.8k
  • 1
  • 9
  • 19

Enable the globstar Bash shell option: shopt -s globstar

Now change directory into B and run:

for i in **/; do
    [ -d "<A-dir>/$i" ] && cp "$i/"*.build "<A-dir>/$i"
done

This will recursively check each subdirectory in B and see if there is an equivalent subdirectory in A. If there is then it will copy all .build files from the B subdirectory over to A.