Skip to navigation
Shell script to resize pictures and save them into a separate folder
07.12.13
#!/bin/bash new=/var/www/NEWDIR for i in $(find . -name "*jpg"); do img=$(basename $i); dir0=$(dirname $i); dir=$dir0 if [ ! -d $new/$dir ]; then mkdir -p $new/$dir; fi if [ ! -f $new/$dir/$img ] then convert -size 120x120 -geometry 120x120 $i $new/$dir/$img fi done http://www.electrictoolbox.com/test-file-exists-bash-shell/
Reply
Anonymous
Information Epoch 1728122917
Design for visibility.
Home
Notebook
Contact us