I am trying to save the camera make to a variable in my Bash script. If I use:

exiftool -make x.jpg

This returns:


I need it to return just the value, without the key and colon.


3 Answers 3


From the man page:

-s[NUM] (-short)

    Short output format. Prints tag names instead of descriptions.
    Add NUM or up to 3 -s options for even shorter formats:

       -s1 or -s        - print tag names instead of descriptions
       -s2 or -s -s     - no extra spaces to column-align values
       -s3 or -s -s -s  - print values only (no tag names)

-S (-veryShort)
    Very short format. The same as -s2 or two -s options.
    Tag names are printed instead of descriptions, and no extra
    spaces are added to column-align values.

So, any of the following will work:

exiftool -s -s -s -make x.jpg

exiftool -s3 -make x.jpg

exiftool -s -S -make x.jpg

Note that combining multiple -s options into -sss, such as increasing -v/-vv/-vvv verbosity in some Linux/Unix command line utilities such as tcpdump, will not work.

  • \$\begingroup\$ This doesn't work (anymore?) to hide the tag name. At least not with my version of exiftool: 11.88. The options in the other answers do work (-b or -T). \$\endgroup\$
    – mivk
    Commented Jun 6 at 14:16

Use -b:

$ exiftool -b -make x.jpg

From the man page:

-b (-binary)

Output requested metadata in binary format without tag names or descriptions. This option is mainly used for extracting embedded images or other binary data, but it may also be useful for some text strings since control characters (such as newlines) are not replaced by '.' as they are in the default output. List items are separated by a newline when extracted with the -b option. May be combined with "-j", "-php" or "-X" to extract binary data in JSON, PHP or XML format.

Highlight mine; it does what it says on the tin!

  • \$\begingroup\$ That's great for extraction decimal GPS values! Thanks! \$\endgroup\$
    – s.k
    Commented Mar 27, 2021 at 13:15
  • \$\begingroup\$ To get the name of your tag, use exiftool -s your.jpg. With -s you get tag names that don't contain spaces. See also this. \$\endgroup\$ Commented May 23, 2023 at 11:29

The -T option will hide the tag name, so you get only the value (example with a different tag ImageDescription):

exiftool -s -T -ImageDescription $HOME/Downloads/2023-02-15_HippoDayChobe.jpg

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.