Last active
December 21, 2020 23:56
-
-
Save Daij-Djan/35aaab9b644e3cbf68e4ed241467bc0f 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
p="/Users/dpich/Desktop/t/bilder/impressionen/" | |
echo $p | |
t="/Users/dpich/Dropbox (Personal)/Maria's Art/__Copies For Website/Impressionen/" | |
echo $t | |
cd "$t" | |
for f in `ls $p`; do | |
file=$p/$f | |
img=`pcregrep -o1 -e "<img src=\"(.*_med).*\\.jpeg\"" "$file"` | |
img_path=$p/$img"_hr.jpeg" | |
img_name=`basename "$img_path"` | |
echo "process "$file":" | |
if test -f "$img_path"; then | |
echo "copy "$img_path" to "$img_name | |
cp $img_path $img_name | |
else | |
echo "no image" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment