[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: exif --remove not idempotent, and a Debian man page bug



Greg Wooledge wrote:

>> Look more, quote less ...
>> 
>>     <incal> for f in **/*.jpg; do exif --remove -o $f $f; done | grep
>  'Wrote
>>             file' | wc -l # 2277 (1st invocation)
>>             
>>     <incal> for f in **/*.jpg; do exif --remove -o $f $f; done | grep
>  'Wrote
>>             file' | wc -l # 2277 (2nd invocation)
>
> There is NO exif output in that message.

It's IPC, piped to wc. You want me to yank it here? Sure, just
ask man ...

$ repeat 2 for f in **/*.jpg; do exif --remove -o $f $f; done 2>&1 | head -n 10
<f --remove -o $f $f; done 2>&1 | head                                       -n 10
Wrote file 'berlin.jpg'.
Corrupt data
The data provided does not follow the specification.
ExifLoader: The data supplied does not seem to contain EXIF data.
Wrote file 'bike/25-balls.jpg'.
Wrote file 'bike/bike-swamp/adv/vasteras/adv-gear.jpg'.
Wrote file 'bike/bike-swamp/moas-valve/moas-valves.jpg'.
Wrote file 'bike/bike-swamp/moas-valve/valves-2.jpg'.
Wrote file 'bike/bike-swamp/pigeon/front.jpg'.
Wrote file 'bike/bike-swamp/pigeon/hermes.jpg'.
Wrote file 'berlin.jpg'.
Corrupt data
The data provided does not follow the specification.
ExifLoader: The data supplied does not seem to contain EXIF data.
Wrote file 'bike/25-balls.jpg'.
Wrote file 'bike/bike-swamp/adv/vasteras/adv-gear.jpg'.
Wrote file 'bike/bike-swamp/moas-valve/moas-valves.jpg'.
Wrote file 'bike/bike-swamp/moas-valve/valves-2.jpg'.
Wrote file 'bike/bike-swamp/pigeon/front.jpg'.
Wrote file 'bike/bike-swamp/pigeon/hermes.jpg'.

> The only "output" there is from wc -l, and it's you typing
> it as a comment after the shell command, not even showing
> it properly.

Okay, is that in a RFC or somewhere in the POSIX specification?

> The entire thread was a result of your assumption that exif
> would NOT write the words "Wrote file" if the input file had
> no exif tag in it. This turned out to be false. exif writes
> those words every time.

IMO it shouldn't write anything if nothing happens and in
particular it shouldn't take time, which it does. Every time.

> Problem solved.

OK, how should it be done? No computing the second time the
metadata is removed? You do the triangular dance with
filenames, i.e. the tool can't do that? Is that what you mean?

-- 
underground experts united
https://dataswamp.org/~incal


Reply to: