Last active
March 27, 2020 17:29
-
-
Save cflynn07/cd3373b51ef4b1ff04073de42569cacf to your computer and use it in GitHub Desktop.
looping over files matching brace expansion
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 | |
RESULT=$(for file in web/static/images/fullstack-react-time-tracking{"","-1","-2","-3"}.png; do | |
echo $file | |
echo -n "before:\t"; du -h $file | awk '{print $1}' | |
magick convert $file -resize 50% $file | |
echo -n "after:\t"; du -h $file | awk '{print $1}' | |
done) | |
echo $RESULT | |
echo $RESULT | pbcopy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment