Given a provisioning profile. What commands will tell me if it is an app-store or an ad-hoc profile (or neither of those two types)?
An ad hoc profile will contain a XML section that lists the devices. That doesn't exist for App Store or enterprise.
So...
pmills$ strings /Users/pmills/X_Ad_Hoc.mobileprovision | grep ProvisionedDevices
...displays:
<key>ProvisionedDevices</key>
...while...
pmills$ strings /Users/pmills/X_App_Store.mobileprovision | grep ProvisionedDevices
...displays nothing.