Hello
Simply trying
exiftool -s1 -sort -G -*date* <FILENAME>
it works with bash
it doesn't work with zsh
Any solutions? as MACOS (Monterey) suggests I use zsh instead of bash...
Thanks
Put the asterisks in quotes. In some linux shells (I thought all, but apparently not), the an asterisk without quotes is file globbing and those asterisks are being replaced by file names.
I would also suggest using -Time:All, as not all time related tags have date in the name
exiftool -s1 -sort -G -Time:All /path/to/files/
Edit: Found an ELI5 post on file globbing (https://www.reddit.com/r/explainlikeimfive/comments/21bmls/eli5_bash_globbing_and_grep_i_am_having_trouble/)
I haven't moved to zsh.
And my shell scripts have #!/bin/bash at the top.
Thanks for your help. Not used to a command-line system within a command-line system! A spattering of quotes is obviously the answer to trick either the shell (or the program exiftool) into understanding each other. Globbing is my new saviour...
BTW - I like -Time:All. Are there any other really useful "pseudo" Tags that I should be aware of that are very handy when searching or filtering photo metadata?
Time is a Group 2 name. Group 2 names consist of
Audio
Author
Camera
Device
Document
ExifTool
Image
Location
Other
Preview
Printing
Time
Unknown
Video
The full list can be found under the GetAllGroups function (https://exiftool.org/ExifTool.html#GetAllGroups) or by using the -listg option (https://exiftool.org/exiftool_pod.html#list--listw--listf--listr--listwf--listg-NUM--listd--listx). In this case it would be -listg2.
Thanks for the help and references. I think I'm on the right path now with all the information provided by you and this forum.
I am now ignoring switching between bash and zsh... I'll stick with zsh and try to work around its slight differences, even though most scripts in tutorials and examples seem to be bash oriented. After all, it's only "exec bash" in the Mac terminal to get the bash shell running again!