I am currently using a command line utility on MacOS (Sierra) called [Exiftool](http://www.sno.phy.queensu.ca/~phil/exiftool/). There are a number of ways to run this CLI however in essence, you point the interface at a file and it returns information about a file. In order to limit the amount of information returned, you can simply add arguments to it.

At the moment, here is what I'm trying to achieve in pseudocode:-

Run 'exiftool' against a specific image file. If the 'Megapixels' value > 0 then return 'filename', 'OriginalDate' and 'Megapixels'.

The command to return 'filename' and 'OriginalDate' and 'Megapixels' is simply:-

```
exiftool -filename -OriginalData -Megapixels myphotograph.jpeg

```

How do I however check the Megapixels value before returning all three values? So in essence, I want to run the exiftool CLI against myphotograph.jpeg and if the Megapixels value (argument) is greater than 0, I want it to return that value and the additional two? The output will ultimately be output to a .csv file.

Hope this makes sense.

Thanks