Created
October 18, 2015 18:35
-
-
Save velikodniy/1efab0908eba56204755 to your computer and use it in GitHub Desktop.
Encrypt dirs with given prefix (zsh)
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/zsh | |
PREFIX=2008 | |
FROM='/media/vadim/Data/Фотографии' | |
for dir in $FROM/$PREFIX*; | |
do | |
echo -n "$dir" ... | |
dirname=$(basename "$dir") | |
tar c -C "$FROM" $dirname | gpg -e -r "Vadim Velikodniy" -o "$dirname.tar.gpg"; | |
echo OK | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment