I am working on a shell script with exiftool to automatically change some exif tags on pictures contained in a certain folder and I would like to use the output to get a not
Put the tail inside the capturing parens.
OUTPUT=$(exif ... | tail -1)
You don't need the double quotes here. I'm guessing that you tried
OUTPUT="$(exif ...) | tail -1"
Probably an old post to be answering now, but try using the -n flag (see tail --help) and wrap the command output using ticks.
OUTPUT=`exif ... | tail -n 1`
(user464502's answer did not work for me as the tail command does not recognize the parameter "-1")