Last active
May 10, 2019 09:06
-
-
Save franklinbr/3914e7d481757957d80ae205ddfa1374 to your computer and use it in GitHub Desktop.
Jao leme Recursive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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