Stefan Krah wrote:
[GNU find]:

find . -name '*.[Jj][Pp][Gg]' -print0 | xargs -0 jhead \
        | awk '/^File name/{printf "NAME: %s\t", $4} \
               /^File size/{printf "SIZE: %s\t", $4} \
               /^Date\/Time/{printf "DATE: %s %s\t", $3, $4} \
               /^Resolution/{printf "RESO: %s x %s\n", $3, $5}'

Wouah ! This seems nice to my untrained eyes. I'll try to understand it now, and I'll be back with comments. Thank you.

Untested, I don't know the exact output of jhead. And find will of course
descend further unless you prevent that with -maxdepth or similar.

I need to man awk and man xargs before I can comment on -maxdepth. I'll do now.

Thank you once more.

BTW, if anybody has a "better" tool than jhead for that, I'd appreciate
to know about it.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to