[Nottingham] Image list

Robert Ross rross at dmu.ac.uk
Fri Dec 1 13:42:26 GMT 2006

Hi Roger,

> This is what I'd do. I've made it easy to improve so that we 
> can talk about this all afternoon...
> for pic in /var/www/images/*; do
>     size=$(ls -l /var/www/images/${pic} | awk '{print $5}')
>     width=$(identify ${pic} | awk '{print $3}' | sed -e 's/x.*//')
>     height=$(identify ${pic} | awk '{print $3}' | sed -e
> 's/.*x\([0-9]*\).*/\1/')
>     echo "${pic},${size},${width},${height}" >> list.csv
> done


I haven't got a clue about this (far to advanced for this mere mortal)
but I'll give it a go.



More information about the Nottingham mailing list