% identify filename.jpg
If you want to be studly, you can use
-format
to tailor the output
% identify -format "insert into bw_graphics values (generate_primary_key(), '/images/llamas/%f', %w, %h);" *.jpg
generates a sqlinsert
statement for each image.