Created
January 28, 2012 16:24
-
-
Save Meettya/1694918 to your computer and use it in GitHub Desktop.
simply paralell bash bath image resizer
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 | |
#=================================== | |
# | |
# This command resize all images | |
# in this dir and all sub dirs | |
# For common purpose. | |
# | |
# GNU Parallel version | |
# http://www.gnu.org/software/parallel/ | |
# http://software.opensuse.org/download.html?project=home:tange&package=parallel | |
# | |
# usage: | |
# convert-bath.sh dirname | |
# | |
# (C) Meettya winter 2012 | |
#=================================== | |
prefix="res_" | |
size="1920x1080>" | |
if [ -d "$1" ]; then | |
find "$1" -type f ! -name "$prefix*" ! -name "*.txt" ! -name "*.db" | | |
parallel "echo {}; convert {} -adaptive-resize '$size' {//}/'$prefix'{/}" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment