Embed exif comment with jhead

The jhead program be used to add or modify comments in JPEG image files. However I found using the -ce option to ‘edit comments’ not a good way to do that as it adds an extra newline to the end of the comment.

Here is the better way to add a comment, without adding that extra newline.

    echo -n 'photo of some stuff, by Joe Citizen' |\
       jhead -ci /dev/stdin  image_of_stuff.jpg