A command for finding an application's version number?

Hello,
I need a command for finding the version number of a specific application installed in OS X, and I need to be able to run it via the UNIX feature of Apple Remote Desktop, so that I can run it on hundreds of computers. First I tried this:
system_profiler -detailLevel full
It works, but it takes a long time to produce the output, because it's gathering and outputting all of the information that System Profiler provides. I don't know if there's a way to narrow it down so that it only gives me the version number of the specific application I need to know about. This is an example of what the output looks like for each application listed.
    iPhoto:
      Version: 9.2.1
      Last Modified: 10/27/11 10:05 AM
      Kind: Intel
      64-Bit (Intel): No
      App Store: No
      Location: /Applications/iPhoto.app
Copying that to TextEdit and searching for the application's name takes way too long, especially for hundreds of computers. Are there any arguments or regular expressions I could add to the command to narrow it down, and make it only output the information I need?
Someone suggested this command, which takes the information from Spotlight:
mdls -name kMDItemVersion <path to file>
That works for apps in the Applications folder, but the application I need the version number for is in the /usr/bin folder and I'm guessing that's not indexed by Spotlight, because it returns:
kMDItemVersion = (null)
Any help would be greatly appreciated!
-Mike

You rock! I'm definitely on the right track now. Yes, it's a regular application package, not a UNIX executable. Ok, so I use this command to display the Info.plist file inside that package:
cat /usr/bin/uc/UndercoverRegistration.app/Contents/Info.plist
And it outputs this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleExecutable</key>
    <string>UndercoverRegistration</string>
    <key>CFBundleIconFile</key>
    <string>Undercover</string>
    <key>CFBundleIdentifier</key>
    <string>com.orbicule.UndercoverRegistration</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>4.5</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>4.5</string>
    <key>NSMainNibFile</key>
    <string>MainMenu</string>
    <key>NSPrincipalClass</key>
    <string>NSApplication</string>
</dict>
</plist>
So can I add arguments to that command to have it only display the version number, which is on line 18 (the value is 4.5 here)? So would I be able to display only line 18, or display whatever is below the line that reads "<key>CFBundleShortVersionString</key>"? Thanks!

Similar Messages

  • [svn:osmf:] 14357: Moved constants for namespace ( also added a version number to the namespace) and the metadata key to the MASTPluginInfo class so these constants can be used from player code .

    Revision: 14357
    Revision: 14357
    Author:   [email protected]
    Date:     2010-02-23 09:41:57 -0800 (Tue, 23 Feb 2010)
    Log Message:
    Moved constants for namespace (also added a version number to the namespace) and the metadata key to the MASTPluginInfo class so these constants can be used from player code.
    Modified Paths:
        osmf/trunk/plugins/MASTPlugin/org/osmf/mast/MASTPluginInfo.as
        osmf/trunk/plugins/MASTPlugin/org/osmf/mast/media/MASTProxyElement.as

    Revision: 14357
    Revision: 14357
    Author:   [email protected]
    Date:     2010-02-23 09:41:57 -0800 (Tue, 23 Feb 2010)
    Log Message:
    Moved constants for namespace (also added a version number to the namespace) and the metadata key to the MASTPluginInfo class so these constants can be used from player code.
    Modified Paths:
        osmf/trunk/plugins/MASTPlugin/org/osmf/mast/MASTPluginInfo.as
        osmf/trunk/plugins/MASTPlugin/org/osmf/mast/media/MASTProxyElement.as

  • Can you sync 2 apple ID's for Find Iphone Application?

    My Husband & I both have IPhone/IPad/IPod & MacBooks and we have seperate Apple ID's. We would both like to be able to access all the devices under the Find IPhone application, but I can only see my devices and he can only see his. Is there a way to sync the two apple ID's? Thank you!

    Yes if she has her own user account on the MacBook.  One user account can't sync to two separate iCloud accounts.
    OT

  • How do I specify the build number when deploying an iOS application (not version number)

    I'm looking for a way to specify the application's build number when deploying an iOS application.
    Currently in the -app.xml file, you can specify a version number by using:
    <versionNumber>1.0.24</versionNumber>
    But when submitting to the iTunes Connect store, I want to be able to submit the new updates as a build change, and not version change to avoid the approval process again.
    Can this be done ?
    Thanks in advance.
    -Daniel

    Hi Gig52,
    Unfortunately, there is no way for you update/modify/increment the build/version number information from the command line. You will have to set that via the Project Explorer. You could check the box labeled Auto Increment in the Version Information property to have the version number automatically increment each time you build your application.

  • Command to find out the cas serial number

    HI,
    need some urgent help
    Anyone knows the command to find out what is the serial number of my CAS ?
    The device is in a different location , so cant check physically.
    IS there a show version for CAS ?
    regards
    Raj

    Glad that worked Raj.
    The right serial number should be the one tied to the Product Name "Proliant..."
    For example, you may also want to use the following alternative:
    [root@cca-3140-cas ~]# dmidecode | more
    Handle 0x0001, DMI type 1, 25 bytes.
    System Information
            Manufacturer: HP
            Product Name: ProLiant DL140 G2
            Version: 419758-001
            Serial Number:
            UUID:
            Wake-up Type: Power Switch
    Regards,
    Fede
    If  this helps you and/or answers your question please mark the question as  "answered" and/or rate it, so other users can easily find it.

  • How Do I Find Out a Folio Version Number

    Hi Guys,
    So far, everytime I have submitted a folio to the App Store, I have received a variation of the following error:
    Version Mismatch - Neither CFBundleVersion ['3.4.2.9.91210'] nor CFBundleShortVersionString ['1.0.8'] in the Info.plist match the version of the app set in iTunes Connect ['2.0'].
    I'd like to be able to put the correct version number into iTunes Connect when I upload the App, but how do I find it? Where is the CFBundleShortVersionString for each folio located?
    Cheers
    Chris

    It isn't necessary to change that number—Apple is just giving you a housekeeping warning—but if you really want to edit the version number in iTunes, you can find it in DPS App Builder.

  • How to pull application names & version numbes  from  weblogic servers ??

    Hi Friends,
    I have situation that I need to display the application names and version number of ear/war/jar files that got deployed on weblogic servers using WLST or any simple way to do that.
    Scenario: I have 2 manged servers MNG1 & MNG2 and I had deployed google.1.4.5.ear, web.4.514.war & xxx.jar files and targeted to MSG1 & MSG2.
    ++++++
    Now I want to pull the applications names and the version numbers associated with it and display to some kind of dashboard page like below.
    | Application Name | Dev Environment | TEST Environment | PROD Environmnet |
    google 1.4.5 1.4.5 1.4.5
    web 4.514 4.514 4.514
    Like this .....
    can any one tell me the best way for achieving this task
    Thanks in advance,
    newbee
    Edited by: user11140631 on Dec 23, 2009 11:18 PM

    HI,
    Here i have developed a Simple JMX Code which displays the Application Name, It's Current Status and The Application Version. Please let me know this is what u wanted?
    import java.util.*;
    import java.util.Enumeration;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.management.ObjectName;
    import weblogic.jndi.Environment;
    import weblogic.management.*;
    import weblogic.management.runtime.*;
    import javax.management.*;
    public class ApplicationStatusChecker
    MBeanServer server = null; // MBeanServer
    MBeanHome mbeanHome=null;
    Hashtable inStart = new Hashtable();
    public ApplicationStatusChecker()
    try {
    Environment env = new Environment();
    env.setProviderUrl("t3://localhost:7001");
    env.setSecurityPrincipal("weblogic"); // username
    env.setSecurityCredentials("weblogic"); // password
    Context myCtx = env.getInitialContext();
    mbeanHome =(MBeanHome)myCtx.lookup("weblogic.management.home.localhome");
    server = mbeanHome.getMBeanServer();
    catch (Exception ex)
    System.err.println("\n\n\tCannot get MBeanServer: "+ex);
    public void getAllMBeans()
    Set set=mbeanHome.getAllMBeans();
    Iterator it=set.iterator();
    while(it.hasNext())
    System.out.println("\n\t "+it.next());
    public void getMBeanByType(String type)
    Set set=mbeanHome.getMBeansByType(type);
    Iterator it=set.iterator();
    while(it.hasNext())
    ApplicationRuntimeMBean appRun=(ApplicationRuntimeMBean)it.next();
    int n=appRun.getActiveVersionState();
    String status="";
    if(n==0) status="UNPREPARED";
    if(n==1) status="PREPARED";
    if(n==2) status="ACTIVATED";
    System.out.println("Application Name : "+appRun.getApplicationName());
    System.out.println("Application Status : "+status);
    System.out.println("Application Version : "+appRun.getApplicationVersion());
    System.out.println("---------------------------------------");
    public static void main(String ar[]) throws Exception
    ApplicationStatusChecker sm=new ApplicationStatusChecker();
    sm.getMBeanByType("ApplicationRuntime");
    OUTPUT
    C:\DELETE>java ApplicationStatusChecker
    Application Name : UsernameTokenEar
    Application Status : ACTIVATED
    Application Version : null
    Application Name : consoleapp
    Application Status : ACTIVATED
    Application Version : null
    Application Name : bea_wls_internal
    Application Status : ACTIVATED
    Application Version : null
    Application Name      : complexServiceEar+
    Application Status    : ACTIVATED+
    Application Version   : VesionB+
    Application Name : bea_wls9_async_response
    Application Status : ACTIVATED
    Application Version : null
    Application Name : mejb
    Application Status : ACTIVATED
    Application Version : null
    Application Name : SystemModuleA
    Application Status : ACTIVATED
    Application Version : null
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com (WebLogic JMX And Wonders Are Here)

  • Key command for finding external startup drive??

    Hello -- I have an iBook G$ , running OS X 10.3.9. I fear the internal drive is dying. I have an external Firewire drive connected which has a OS X partition on it. I need to know what the KEY COMMAND is to force the iBook to find the OS X on the external drive. Does anyone know what this key command is?
    Thank you very much,
    Nick

    Hi Nick
    It is the Option Key you are after.
    Startup Manager: How to select a startup volume.

  • Is it possible to make a global keyboard command for an Applescript application?

    I have created an application with Applescript, and I want to create a global keyboard command that brings up an input dialogue.
    If that's not possible, is there a way to make a dialogue appear when the Dock icon is clicked?

    The regular keyboard shortcuts work with whatever application is currently active, so that leaves option number 2.  To add a dynamic menuu item to the dock menu, you can add a couple of handlers to the CocoaAppletAppDelegate.scpt, which is located in the bundle contents of the Cocoa-AppleScript applet (created when you use the File > New from Template menu item):
      on applicationDockMenu_(sender) -- dynamically add a menu item to the dock tile
        set myDockMenu to current application's NSMenu's alloc's initWithTitle_("") -- don't really need a title here
        myDockMenu's addItemWithTitle_action_keyEquivalent_("My spiffy new menu item", "menuAction:", "")
        return myDockMenu
      end applicationDockMenu_
      on menuAction_(sender) -- do something when the dock menu item is selected
        set menuTitle to sender's title() as text
        # do something
        tell current application to activate -- make sure dialog is in front
        display dialog "The " & quoted form of menuTitle & " menu item was clicked…"
        tell application "System Events" to keystroke tab using {command down} -- switch to previous application
      end menuAction_

  • SAP script command for finding string length

    Hi ,
    Can anyone please let me know what is the equivalent command  to strlen() in sap script editor. I need to find the string length of a symbol in sap script editor itself without writing the logic in print program or by calling any includes in the sap script editor.
    Regards,
    Deepthi

    Hi Deepthi,
    As an alternative, you can use the perform statement in SAPscript so that it will execute a subroutine you implemented in another report.In the subroutine, you can do everything you want.
    Have a look at this link to find out how exactly.
    http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm
    Best regards,
    George

  • Is there chatr command for solaris??

    Hi Everybody,
    In HP-UX, I use chatr command for finding the library dependencies and for changing their flags dynamically.
    Can you please let me know if there is any such command in solaris 10??
    I know ldd command, but it does not allow me to change the library loading flags.
    Thanks in advance
    Durga Prasad

    Solaris will always use your LD_LIBRARY_PATH to find the location of your dynamic libraries. If you haven't defined any LD_LIBRARY_PATH the systems settings are used instead. You may alter the default settings of your system by running the crle utility.
    As far as i understand; if you build a static library under Solaris, the executable will actually contain the static libraries which you linked into it so it won't have to load external libraries.
    7/M.

  • How to find Oracle form version number at runtime in Form 6 webform

    hi ,
    i developing form at offshore , form server is running at somewhere in UK.
    i am running form from development PC , can i find out exact form version number at runtime with some code?
    Thank u

    Beginning with Forms 6i you can use GET_APPLICATION_PROPERTY(VERSION).

  • How do I get otool's version number?

    I need to find out otool's version number in order to post a bug, but I can't find a command line option for this.
    Specs:
    * otool v?.?.?
    * Xcode 4.5
    * Mac OS X 10.8.2
    * MacBook Pro 2009

    Aha! There it is! I guess I didn't manage to stumble down that path through the menus.
    There was a slight additional problem that I've also been investigating: I didn't spot the version number at first, until I tried expanding the image to see what some of the tiny, unreadable squiggles were. One of them was the version number. I've seen this a lot lately, in most of the (7 so far) browsers that I've loaded onto the phone. I have some test pages with lots of text, with lots of HTML tags, but I've carefully excluded any hints as to sizes. No font tags, no width= or size= attributes, etc. FF and others format various chunks of text at different sizes, for no reasons that I can discern. I see a lot of cases where one chunk of text is shown really tiny, and only readable if the page is blown up to a huge size. Different browsers pick different pieces of text to make unreadable this way.
    When I view the same test pages on various browsers on my linux or OSX boxes, the text all comes out the same size, as intended (which is handy for people with visual problems). There's something weird going on with text size on Android and IOS systems, but I haven't been able to diagnose (or fix) it yet. Googling the issue doesn't turn up any clues, just other questions about the issue. Maybe I'll post a question here, after I've worked out a few more test cases.

  • Model and version number

    I would like to find out about using music on my iphone as a ringtone but I don't know how to find out model and version number-please help
    Please explain how I can use music currently on my iPhone as a ringtone?

    What does model and version have to do with a ringtone?
    There are many free ways to make ringtones. Google will find them.
    I prefer to use Garageband to make ringtones.

  • I can't get ITunes to install. I get the message: Error 2 Windows. Not able to find Apple Application Support. Uninstall iTunes and reinstall.  I did that and still get the same message.  Thanks for your assistance.  I'm using a Dell Computer, Windows 8

    Can't get iTunes to install. When I download it, and go through installation, I get the message, Error 2, windows 2; can't find Apple Application Support, uninstall and reinstall iTunes.  When I do that I get the same message again. Thank you for your assistance.

    Let's try a standalone Apple Application Support install. It still might not install, but fingers crossed any error messages will give us a better idea of the underlying cause of the issue.
    Download and save a copy of the iTunesSetup.exe (or iTunes64setup.exe) installer file to your hard drive:
    http://www.apple.com/itunes/download/
    Download and install the free trial version of WinRAR:
    http://www.rarlab.com/
    Right-click the iTunesSetup.exe (or iTunes64Setup.exe), and select "Extract to iTunesSetup" (or "Extract to iTunes64Setup"). WinRAR will expand the contents of the file into a folder called "iTunesSetup" (or "iTunes64Setup").
    Go into the folder and doubleclick the AppleApplicationSupport.msi to do a standalone AAS install.
    Does it install properly for you?
    If instead you get an error message during the install, let us know what it says. (Precise text, please.)

Maybe you are looking for

  • Color laserjet pro m177fw issue

    just bought this printer....printer doesn't finish 'initalizing' . when i hit the home button, it goes there momentarily then goes back to the initializing screen and the blue dot circles the hp logo nonstop. no help when i power down and power back

  • Print preview using Crystal Report

    Hello All, In SBO 8.8 or in 2007 with add-on (like B1UP) it is possible to have a cystal report launched by the preview buttons. It works perfectly when the document is stored in the DB, the preview is blanked if you don't have the document validated

  • I have 2 Apple IDs. How can I move all my purchased (paid-for) apps under only 1 of my Apple IDs?

    Long ago I bought several, relatively expensive, apps under a old Apple ID. I then purchased many more paid-for apps under a new Apple ID. I was unaware that the purchased apps are tied to the Apple ID which I happen to be logged in with, at the time

  • How do I get my documents to open on 'pages'?

    I started writing a college essay today and after doing the introduction the document wont open and it wont tell me why it wont open. My other document still opens fine but if this is going to be a re-occurring problem then I don't want to use this a

  • Can't import mv2 elementary stream

    I'm using DVDSP 412. My project is HDDVD for a Toshiba HD player. (A2) I edited 720P HDV and exported using compressor to HDDVD mpeg 2. I can't import the MV2 into DVDSP. Any suggestions? It is a mpeg 2 elementary file.