On Mon 26 Sep 2022 at 21:31:55 (+0200), Emanuel Berg wrote: > 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'.
Well——yes—I thought most people were interested in the output of $ exif foo.jpg much more than whether there are 2277 lines from $ exif --remove … … being executed on some collection of files; IOW what's being done to the EXIF in their images. > > 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? What? exhorting users to paste their commands' stdout rather than transcribing it into a comment? > > 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. I won't ask why you feel the need to keep running with --remove over and over. > OK, how should it be done? No computing the second time the > metadata is removed? Why oh why "second time"? It's not as if you're removing individual tags in turn, and using the intermediate versions of the images for some purpose. I just don't understand the point of this exercise. > You do the triangular dance with > filenames, i.e. the tool can't do that? Is that what you mean? Cheers, David.