Skip to content

Instantly share code, notes, and snippets.

@franklinbr
Last active May 10, 2019 09:06
Show Gist options
  • Save franklinbr/3914e7d481757957d80ae205ddfa1374 to your computer and use it in GitHub Desktop.
Save franklinbr/3914e7d481757957d80ae205ddfa1374 to your computer and use it in GitHub Desktop.
Jao leme Recursive
#!/bin/bash
file='file.bmp' #arquivo que queres copiar para os demais diretorios
pattern=$(ls -R | grep '^\.' | grep -v '\.:') # lista os diretorios recursivamente com pequenos ajustes cosmeticos
for path in $(echo $pattern)
do
cp -rfv ${file} ${path/:/\/}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment