Mailinglist Archive: opensuse (4054 mails)
| < Previous | Next > |
Re: [SLE] Question on how to write renaming script
- From: Anders Johansson <andjoh@xxxxxxxxxx>
- Date: Sun, 29 Jan 2006 02:05:37 +0100
- Message-id: <43DC14E1.9060009@xxxxxxxxxx>
Rikard Johnels wrote:
> This implies running the exiftool three times to get the variables filled,
> right?
> As exiftool is quite slow in execution i would have hoped to refrain from
> running it more than once in my script.
> But i will surely look into this approach and do some experimenting.
Well, I'm not very good at bash scripting, so I'm sure this can be
vastly improved upon, but I got it working using something like
exiftool -f -S -s -Date -Time -FrameNumber filename|(read IMGDATE
read IMGTIME
read IMGFRAME
if [ "$IMGDATE" = "-" ]; then
and so on as in my other mail, finished up with a ), then put the whole
thing inside a "for filename in *.jpg *.pef *.whatever; do" and end it
with a "done"
> This implies running the exiftool three times to get the variables filled,
> right?
> As exiftool is quite slow in execution i would have hoped to refrain from
> running it more than once in my script.
> But i will surely look into this approach and do some experimenting.
Well, I'm not very good at bash scripting, so I'm sure this can be
vastly improved upon, but I got it working using something like
exiftool -f -S -s -Date -Time -FrameNumber filename|(read IMGDATE
read IMGTIME
read IMGFRAME
if [ "$IMGDATE" = "-" ]; then
and so on as in my other mail, finished up with a ), then put the whole
thing inside a "for filename in *.jpg *.pef *.whatever; do" and end it
with a "done"
| < Previous | Next > |