Created
December 10, 2010 21:10
-
-
Save Cellane/736825 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/env bash | |
| echo -n "Zdrojový adresář: " | |
| read zdroj | |
| echo -n "Cílová cesta: " | |
| read cil | |
| echo -n "Přípona: " | |
| read pripona | |
| if [ -d $zdroj ]; then | |
| if [ ! -d $cil ]; then | |
| mkdir $cil | |
| fi | |
| find $zdroj -type d -exec mkdir $cil/'{}' ';' 2>/dev/null | |
| find $zdroj -type f -regex ".*$pripona" -exec cp '{}' $cil/'{}' ';' 2>/dev/null | |
| else | |
| echo "Adresář neexistuje!" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment