Skip to content

Instantly share code, notes, and snippets.

@luxedo
Created February 21, 2020 16:58
Show Gist options
  • Save luxedo/45ffb0487b7fa8b3f8187fb4ccc8f0f5 to your computer and use it in GitHub Desktop.
Save luxedo/45ffb0487b7fa8b3f8187fb4ccc8f0f5 to your computer and use it in GitHub Desktop.
Creates a table with the jpeg quality and size for every file in the current directory
echo 'file_name\tquality\tsize (KB)' && for i in $(ls); do echo $i'\t'$(identify -format "%Q" "$i")'\t'$(ls -ls "$i" | cut -d " " -f1); done
# file_name quality size (KB)
# q_001_0001.jpg 1 152
# q_010_0001.jpg 75 852
# q_020_0001.jpg 94 2000
# q_030_0001.jpg 98 3144
# q_040_0001.jpg 99 3700
# q_050_0001.jpg 99 4260
# q_060_0001.jpg 100 4940
# q_070_0001.jpg 100 4940
# q_080_0001.jpg 100 4944
# q_090_0001.jpg 100 4944
# q_100_0001.jpg 100 4940
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment