Using 'defaults read' and storing the output in a variable

Hi all,

I'm creating a script which uses 'defaults read' to retrieve details from an Info.plist like this;

defaults read "/Path/Contents/Info" CFBundleShortVersionString

This works fine in Terminal and returns the expected values.

Is it possible to use this command in a script, and store the output into a variable?

Many thanks in advance :slight_smile:

Dave