How would I run these commands?

I'd like to derive version metadata on specific applications AND I'd like to extract the Mac OS Build while I'm at it.  Each of the following commands works great individually but to run the entire batch at once and have it echo back a simple report do I need to create a script?  How can I tiew these together in a Terminal command?  Thanks.
mdls -name kMDItemVersion /Applications/Microsoft\ Office\ 2011/Microsoft\ Excel.app
mdls -name kMDItemVersion /Applications/Adobe\ Reader.app
mdls -name kMDItemVersion /Applications/Safari.app
mdls -name kMDItemVersion /Applications/Google\ Chrome.app
mdls -name kMDItemVersion /Applications/Adobe\ Acrobat\ X\ Pro/Adobe\ Acrobat\ Pro.app
SW_VERS

Open the AppleScript Editor in the /Applications/Utilities/ folder and run:
set the_versions to (do shell script "mdls -name kMDItemVersion /Applications/Microsoft\\ Office\\ 2011/Microsoft\\ Excel.app")
set the_versions to the_versions & return & (do shell script "mdls -name kMDItemVersion /Applications/Adobe\\ Reader.app")
set the_versions to the_versions & return & (do shell script "mdls -name kMDItemVersion /Applications/Safari.app")
set the_versions to the_versions & return & (do shell script "mdls -name kMDItemVersion /Applications/Google\\ Chrome.app")
set the_versions to the_versions & return & (do shell script "mdls -name kMDItemVersion /Applications/Adobe\\ Acrobat\\ X\\ Pro/Adobe\\ Acrobat\\ Pro.app")
(107655)

Similar Messages

  • How would YOU retype these old XM08 types for use in an ABAP OO method?

    The XM08 function group has the following type declarations:
    TYPES: BEGIN OF mmcr_drseg_co.
            INCLUDE STRUCTURE cobl_mrm_d.
    TYPES: cr LIKE drseg_cr    OCCURS 0,
           unpl_refwr TYPE refwr,
           END OF mmcr_drseg_co.
    TYPES: mmcr_tdrseg TYPE mmcr_drseg OCCURS 0,
    TYPES: BEGIN OF mmcr_drseg.
            INCLUDE STRUCTURE drseg.
    TYPES: cr LIKE drseg_cr OCCURS 0,
           co TYPE mmcr_drseg_co OCCURS 0,
           sm LIKE drseg_sm OCCURS 0,
           charact TYPE rbcharact_instance OCCURS 3,
                                           "instances of characteristics
           uebgmat  TYPE matnr,
           uebrblgp TYPE rblgp,
           selkz_db TYPE selkz,
           rblgp_old TYPE rblgp,           "rblgp before aggregation
           END OF mmcr_drseg.
    How would YOU redeclare these types so that they work in an ABAP Objects class?  
    Some of the "fixes" are easy, like replacing "LIKE" with "TYPE:".
    But what about the "INCLUDE STRUCTURE" and the "occurs 0" specifications?
    The reason I'm asking this is that I have to call a method from ZXM08U16 and I'd like to be able to pass this method exactly what XXM08U16 gets from SAP, i.e. the table E_TDRSEG of type  MMCR_TDRSEG

    David,
    I wonder it can be directly in ABAP (I would like to hear opinions from others as well!), I needed to use Data Dictionary as well:
    TYPES: BEGIN OF mmcr_drseg_co.
            INCLUDE STRUCTURE cobl_mrm_d.
    TYPES: cr TYPE z_tt_drseg_cr,
           unpl_refwr TYPE refwr,
           END OF mmcr_drseg_co.
    z_tt_drseg_cr is a table type created in SE11, based on structure drseg_cr.
    the way to create internal table and work area, based on the above:
    DATA : gt_... TYPE TABLE OF mmcr_drseg_co.
    DATA : gw_... TYPE mmcr_drseg_co.
    hope this helps some
    ec
    UPDATE : Rich is right, it is possible to do it only in ABAP with the DEFAULT KEY addition.

  • Make, Make install - Command not found. How do I get these commands working

    Hi guys!
    I am trying to compile the php using the command ./configure and make, make install but every time I try to use the comand "make" it says "command not found". Do you know how can I install these bibliotec?
    Thanks in advance.
    Felipe Moreira.

    Hi Felipe, Welcome to Apple's Users Help Users Forums.
    Glad you got it solved.
    Thanks in Apple Forums is through the Stars system. See the blue box at the top of the thread as well as the Apple emails re new posts to the thread.
    With the buttons just to the left of "Reply" for the OP = Original Poster.
    1 Green Solved available. 10 pts.
    2 Gold Helpful available. 5 pts.
    Mark the buttons at the appropriate post. (Not this one. ;~) )
    Joyous Computing, JP

  • How can one run OS commands from JSP's?

    Hi
    I figured out the perms problem I had, and running a java class that calls Runtime.exec() now works - apparently; in fact, it doesn't really run the OS command, but returns "OK".
    Anyone have an idea how to make it actually run?
    Thanks,
    Paulo

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Paulo Rodrigues ([email protected]):
    Hi
    I figured out the perms problem I had, and running a java class that calls Runtime.exec() now works - apparently; in fact, it doesn't really run the OS command, but returns "OK".
    Anyone have an idea how to make it actually run?
    Thanks,
    Paulo<HR></BLOCKQUOTE>
    Hi Paulo, i use for that function the following code:
    // JDC Tech Tips February 15, 2000
    import java.io.*;
    import java.util.ArrayList;
    public class ExecDemo {
    static public String[] runCommand(String cmd)
    throws IOException {
    // set up list to capture command output lines
    ArrayList list = new ArrayList();
    // start command running
    Process proc = Runtime.getRuntime().exec(cmd);
    // get command's output stream and
    // put a buffered reader input stream on it
    InputStream istr = proc.getInputStream();
    BufferedReader br =
    new BufferedReader(new InputStreamReader(istr));
    // read output lines from command
    String str;
    while ((str = br.readLine()) != null)
    list.add(str);
    // wait for command to terminate
    try {
    proc.waitFor();
    catch (InterruptedException e) {
    System.err.println("process was interrupted");
    // check its exit value
    if (proc.exitValue() != 0)
    System.err.println("exit value was non-zero");
    // close stream
    br.close();
    // return list of strings to caller
    return (String[])list.toArray(new String[0]);
    public static void main(String args[]) throws IOException {
    try {
    // run a command
    String outlist[] = runCommand("rm ./dummy");
    // String outlist[] = runCommand("ls");
    // display its output
    for (int i = 0; i < outlist.length; i++)
    System.out.println(outlist);
    catch (IOException e) {
    System.err.println(e);
    Gert
    null

  • How would you use these Apple devices to create the best network?

    I have the following devices and want to create the best network for my 3 story home:
    Time Capsule 3GB, latest generation (needs to be located on middle floor in a corner room by the Comcast modem)
    Time Capsule late 2009
    Airport Express 2010
    More data, the devices that connect to this network:
    New MacBook pro (in same room with new Time Capsule)
    New iMac (in same room with Time Capsule)
    2009 iMac (on second floor)
    Iphone 5 and 5s
    ipad Minis
    ipad Airs
    Apple TV second generation
    I've done some testing and the signal is pretty good on the second floor (meaning that the download speeds on the second floor iMac are the same as those in the same room with the new Time Capsule).  But the upstairs bedrooms have speeds cut by 50%.
    There is no reasonable way to connect the new Time Capsule by ethernet to any other devices.
    Would it be helpful to extend the wireless network "wirelessly" with the old Time Capsule in an area upstairs with strong signal?  Would the old TC then "re-pump" the signal into the bedrooms which don't have line of sight with the new TC?
    How would I best do this?
    Thanks for any help you can offer.

    Time Capsule 3GB, latest generation (needs to be located on middle floor in a corner room by the Comcast modem)
    Time Capsule late 2009
    Airport Express 2010
    So, the old Time Capsule and AirPort Express are near the new Time Capsule and connected to it with an Ethernet cable.....or are the old Time Capsule and Express not even in use at all?
    Would it be helpful to extend the wireless network "wirelessly" with the old Time Capsule in an area upstairs with strong signal?
    While it would be better if you could connect the old Time Capsule to the new Time Capsule using a wired Ethernet connection, the old Time Capsule might help things out a bit in the bedroom area if it is located where it can receive a strong wireless signal from the new Time Capsule.
    This is one of those situations where performance cannot be predicted and you simply have to try it out in your home to see how well it will work. It could not hurt to use the old TC to extend the signal wirelessly to the bedroom area, if you want to give that a try.
    You did not mention the AirPort Express, but it could possibly be located downstairs if you need more wireless signal coverage in a given area. The trick again, is to find a location where the Express can both receive a strong wireless signal and also provide additional wireless coverage.
    Setting up the old Time Capsule or Express will only take a few minutes if you want to give things a try. Post back if you need more details on "how" to do this.

  • How would leopard run

    I recentely got a eMac
    and I was thinking about upgrading from tiger to leopard,
    but... I don't know how it will run, my eMac does meet the system requirements, but only just
    I have this:
    processor: 1; 1GHz PowerPC G4 (with 512KB L2-cache)
    memory: 512MB DDR SDRAM
    busspeed: 167MHz
    model: PowerMac6,4
    modelname: eMac
    Leopard will run, but how can I find out +how fast+ it will run?
    though leopard has lots of new features, I don't feel like using a OS that will make my mac run slower then my PC (witch has a celeron processor, to give you an idea...)

    Hi,
    I have a 1Ghz Dual PCC Tower (Mirrored Doors) (Circa Jan 2002)
    It came with only 256Mb of RAM and I did run Leopard on it with that RAM.
    I have since given it a birthday present of another 1Gb of RAM and this did give it a speed boost.
    On the Tiger versus Leopard overall speed I see no real difference once I have passed the applications Install point to have what I use everyday or at least now and the.
    Photoshop Eelements 6
    Taco HTML Editor
    iTunes
    iChat (As I have PCI Slots I have USB 2.0 and Extra Firewire ports card for a UVC Compliant Cam)
    Firefox as Browser (although testing Safari 4 with this post).
    Dreamweaver (CS3)
    Little Snitch.
    Word (somewhat older version Office: Mac X)
    Dabble in Pages now and then.
    Once in a while iMovie 6 (Not HD)
    Hope this helps
    9:54 PM Thursday; June 11, 2009

  • How to we run the command  Create Sdmkitjar

    Hii Ep Gurus
                Pl let me know where do i run the command createsdnmkitjar
    Thanks In Advance
    Johny

    Hi Nithya
                  Our Basis People r Migrating the ep server so before doind it they need to pack all the sdm installed components u can refer the doc in the server sdm folder
    thanks
    johny

  • How would I set these two polygons different colors?

    I am trying to replicate the flag in this URL: http://www.cia.gov/cia/publications/factbook/flags/pm-flag.html
    I can get the two stars to be the same color, but how would I make them be the correct different colors?
    I have two classes each posted here:
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import java.awt.*;
    public class PanamaFrame extends JFrame
    {   PanamaFrame()
        {   setTitle("Panama Flag");
            setSize(450, 325);
            setLayout(new GridLayout(2,2));
            JPanel top = new JPanel();
            JPanel bottom = new JPanel();
            //StarPanel topleft = new StarPanel();
           // StarPanel bottomright = new StarPanel();
            top.setBackground(Color.red); //990000
            bottom.setBackground(Color.blue); //6633CC
            add(new StarPanel());
            add(top);
            add(bottom);
            add(new StarPanel());
            setVisible(true);    
    }and
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import java.awt.*;
    public class StarPanel extends JPanel
    {   public void paintComponent (Graphics g)
        {   super.paintComponent(g);
            setBackground(Color.white);
            int[] x={110,119,146,125,133,111,89,96,84,75,102,110};
            int[] y={42,68,68,83,110,94,110,84,75,68,67,42};
            int n=11;
            g.setColor(Color.red);
            g.fillPolygon(x,y,n);
    } Thanks
    Brandon

    I'm new to all this graphica stuff as of this
    week.... so I dont' really know what you mean by
    that? CAn you explain? I need to set the two stars
    to different colors... Is there something that I can
    do? Or will it require much change in the code?You're already using g.setColor(Color.red) to change the color it's painted in. So, make that a private member of your class called starColor and then change that line of code to g.setColor(starColor). Then add a constructor that accepts a Color for an argument and when you create it pass it the Color you want it to be.

  • How can I run different commands in the same system exec window?

    I want to open a window (cygwin) on my Xp machine and sent commands within that window. I then have to monitor what the responses are coming back into the window that was launched. Any ideas on how to do this? I have been playing with the system exec VI but can't seem to get it to do what I want. Any help would be appreciated. Thanks - Troy

    Hello,
    Have you tried setting the wait until completion to true on the System Exec VI?  If so, the LabVIEW documentation claims that the parameter "standard output returns information from the program you called if wait until completion is TRUE. If wait until completion is FALSE, System Exec returns an empty string."
    Could this be the answer to the problem of getting the data returned?
    I hope this helps!
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • Please help How can i run Os commands thru Java programs

    Hey,
    I want to stop and restart the linux server thru java program.Is it possible to run the os commands thru java program.
    I had it thru Runtime.getRuntime().exec("*.exe");
    it only runs the exe files.How can run files other than exe files like .bat,com ans shell commands..Any body knows please help with the code..or mail to this address
    [email protected]
    thankyou,
    regards,
    j.mouli

    What about "start command.com /C execute.bat", or using the overload that takes a String[] as argument?
    What if you use the the full path of execute.bat?
    What error code do you get?
    And what comes th linux, I'm not sure... you'll need a shell interpreter there too, me thinks. (never had to run anything with runtime.exec on linux). Check the man pages if csh, bash, ksh, or what ever shell you like.

  • How would you interpret these?

    okay, I don't know if someone is trying to make me feel stupid or what so could someone let me know how you would interpret these tasks:
    1. add hidden field to indicate a change
    2. add "changed" flag to feed screation.js (Javascript) This jsp will always have the flag set to falsebecause of its association with other pages.
    I thought I understood them but my partner laughed at my attempts to do them, at least I tried.
    Thanks in advance for any help.

    a hidden field is a hidden field in a form, I would guess.
    a changed flag would indicate some variable to hold a value which indicates that a change has happened or not. how that relates to your script, I have no idea.

  • How can you run a command with elevated rights on a remote server with invoke-command ?

    I am trying to run a script on a remote server with invoke-command.  The script is starting and is running fine, but the problem is that it should be running with elevated rights on the remote server.  On the server where I start the invoke-command, my account has the necessary rights.
    The server were I launch the invoke-command is a W2K8 R2.  The remote box is a W2K3 with powershell v2.0 installed.
    When I launch the script on the remote-box from the command line, I don't get the access denied's.
    Is there a way to do this ?
    Thanks in advance

    The script that I want to run is to install the windows updates.  I get an access denied on the download of the updates.
    When I execute the script on an W2K8 box, (not remotely) and I run it with non-elevated rights, I get the same error.
    The script is running fine when it is launched on W2K3 box locally with a domain account that has local admin rights, or on a W2K8 R2 server with a domain account that has local admin rights, but with elevated rights.
    Thanks in advance for your help.
    #=== start script ====
    param($installOption="TESTINSTALL",$rebootOption="NOREBOOT")
    Function Show-Help
    Write-Host ""
    Write-Host "SCRIPT: $scriptName <installOption> <RebootOption>"
    Write-Host ""
    Write-Host "DESCRIPTION: Installatie van WSUS updates op de lokale server"
    Write-Host ""
    Write-Host "PARAMETERS"
    Write-Host " -installOption <[INSTALL|TESTINSTALL]>"
    Write-Host " -rebootOption <[REBOOT|NOREBOOT|REBOOT_IF_UPDATED]>"
    Write-Host ""
    Write-Host "EXAMPLE:"
    Write-Host "$ScriptName -installOption INSTALL -rebootOption REBOOT_IF_UPDATED"
    Write-Host "$ScriptNAme INSTALL NOREBOOT"
    Write-Host ""
    Write-Host "Indien beide parameter weggelaten worden zijn de defaultwaarden :"
    Write-Host " installOption=TESTINSTALL "
    Write-Host " RebootOption=NOREBOOT"
    Write-Host ""
    Exit
    #Include alle globale variablen
    $CEIF_WIN_PATH = (get-content env:CEIF_WIN_PATH)
    $includeFile=$CEIF_WIN_PATH + "\Scripts\include_win.ps1"
    . $includeFile
    #initialiseer error count
    $errcnt=0
    $scriptName=$MyInvocation.MyCommand.Name
    #argumenten controleren
    $arrInstallOption= "TESTINSTALL", "INSTALL" # Mandatory variable with predefined values
    If (!($arrInstallOption –contains $installOption)){ Show-Help }
    $arrRebootOption = "REBOOT", "NOREBOOT","REBOOT_IF_UPDATED" # Mandatory variable with predefined values
    If (!($arrRebootOption –contains $rebootOption)){ Show-Help }
    #Logfile opbouwen
    $logfile = get-logfileName($MyInvocation.MyCommand.Name)
    Log-scriptStart $MyInvocation.MyCommand.Name $logfile
    function Get-WIAStatusValue($value)
    switch -exact ($value)
    0 {"NotStarted"}
    1 {"InProgress"}
    2 {"Succeeded"}
    3 {"SucceededWithErrors"}
    4 {"Failed"}
    5 {"Aborted"}
    function boot-server()
    if ($installOption -eq "TESTINSTALL")
    logger "TESTINSTALL : - Reboot local Server" $logfile
    else
    logger " - Reboot local Server" $logfile
    $thisServer = gwmi win32_operatingsystem
    $thisServer.psbase.Scope.Options.EnablePrivileges = $true
    $thisServer.Reboot()
    $logmsg="Install option = " + $installOption + ", RebootOption = $rebootOption"
    logger "$logmsg" $logfile
    logger "" $logfile
    logger " - Creating WU COM object" $logfile
    $UpdateSession = New-Object -ComObject Microsoft.Update.Session
    $UpdateSearcher = $UpdateSession.CreateUpdateSearcher()
    logger " - Searching for Updates" $logfile
    $SearchResult = $UpdateSearcher.Search("IsAssigned=1 and IsHidden=0 and IsInstalled=0")
    logger " - Found [$($SearchResult.Updates.count)] Updates to Download and install" $logfile
    $Updates=$($SearchResult.Updates.count)
    logger "" $logfile
    foreach($Update in $SearchResult.Updates)
    if ($Update.EulaAccepted -eq 0)
    $Update.AcceptEula()
    # Add Update to Collection
    $UpdatesCollection = New-Object -ComObject Microsoft.Update.UpdateColl
    $UpdatesCollection.Add($Update) | out-null
    if ($installOption -eq "TESTINSTALL")
    else
    # Download
    logger " + Downloading Update $($Update.Title)" $logfile
    $UpdatesDownloader = $UpdateSession.CreateUpdateDownloader()
    $UpdatesDownloader.Updates = $UpdatesCollection
    $DownloadResult = $UpdatesDownloader.Download()
    $Message = " - Download {0}" -f (Get-WIAStatusValue $DownloadResult.ResultCode)
    if ($DownloadResult.ResultCode -eq 4 )
    { $errcnt = 1 }
    logger $message $logfile
    # Install
    logger " - Installing Update" $logfile
    $UpdatesInstaller = $UpdateSession.CreateUpdateInstaller()
    $UpdatesInstaller.Updates = $UpdatesCollection
    $InstallResult = $UpdatesInstaller.Install()
    $Message = " - Install {0}" -f (Get-WIAStatusValue $InstallResult.ResultCode)
    if ($InstallResult.ResultCode -eq 4 )
    { $errcnt = 1 }
    logger $message $logfile
    logger "" $logfile
    #Indien er een fout gebeurde tijdens download/installatie -> stuur mail naar windowsteam
    if ( $errcnt -gt 0 )
    logger " - Fout tijdens de uitvoering van script -> send mail" $logfile
    $mailSubject=$MyInvocation.MyCommand.Name
    $msg = new-object Net.Mail.MailMessage
    $att = new-object Net.Mail.Attachment($logfile)
    $smtp = new-object Net.Mail.SmtpClient($smtpServer)
    $msg.From = $mailFrom
    $msg.To.Add($mailTo)
    $msg.Subject = $mailSubject
    $msg.Body = “Meer details in attachement”
    $msg.Attachments.Add($att)
    $smtp.Send($msg)
    #Moet de server herstart worden ?
    if ($rebootOption -eq "REBOOT_IF_UPDATED" )
    if ($Updates -gt 0)
    #Reboot the server when updates are installed
    boot-server
    elseif ($rebootOption -eq "REBOOT")
    #reboot the server always
    boot-server
    else
    #Do not reboot the server
    logger "Do not reboot the server" $logfile
    Log-scriptEnd $MyInvocation.MyCommand.Name $logfile
    exit 0

  • How do I run a command at startup with systemd?

    I need to run
    # hdparm -B 255 /dev/sda
    at startup. I used to do this in /etc/rc.local using initscrips. How do I do this using systemd?

    Hi@ All!
    I've tried to get power management work on my RTL8187SE Wireless LAN Controller.
    # iwconfig wlan0 power on
    works fine [edit] for some seconds, then connection is lost!
    RTL8187SE is known for such issues due to 'too' aggressive HW-PM - i have been warned ;-)
    [/edit]
    but ...same procedure as last time... how to get it set automatic at boot?
    Tried creating : /etc/udev/rules.d/wlan0_power_save.rules
    with
    ACTION=="add", SUBSYSTEM=="net", KERNEL=="wlan0", RUN+="/usr/sbin/iwconfig wlan0 power on"
    which does not work cause 'iwconfig wlan0' seems to be executed while 'power on' produces an error.
    The way given here depends on 'iw' - but 'iw' does not work due to missing 'nl80211'... *confused*
    Any ideas?
    renegat
    Edit:
    'iw' is the 'newer' set of wireless-tools - and does not support such old cards as mine.
    Last edited by renegat (2013-02-16 09:43:35)

  • How do I undo these commands from terminal?

    I was trying to copy music from my iPod to my mac, so I copy & pasted these two commands into terminal:
    defaults write com.apple.finder AppleShowAllFiles TRUE
    killall finder
    Now there's an icon on my desktop that i can't delete that says ".DS_Store and I can't open it with any of my applications.
    Please help!
    Thanks

    Not sure, try this:
    defaults write com.apple.finder AppleShowAllFile FALSE
    then
    killall Finder

  • I've  downloaded something that is allowing Pop Ups.  How would I remove these?

    Is there a Program to remove Pop Ups?

    The instructions mean, from the desktop, so that the Finder is showing at the upper left of the menu bar as the foreground app, you click Go, then move down nearly to the bottom of the drop down menu that displays and choose Go to Folder. Or, since it has an assigned keystroke, you can skip the mouse method of getting there and just press Command+Shift+G.
    Be aware that these manual instructions may not help. Apple doesn't exactly keep on top of all of the various types of adware that appears. So the type of adware you installed may not even be part of the removal instructions.

Maybe you are looking for

  • TS1567 ipad not detected by windows 7 pc

    I have installed the 64 bit version of iTunes, I have made sure the Apple Mobile devices thing is working... nothing. It's like absolutely nothing is happening when I plug the iPad (current generation) into my computer. VERY aggravating and I want to

  • OWA 2013: Load unsafe script in Google Chrome when attempting to launch Edit in Office Web Apps 2013

    Team As we have On-Premises SharePoint 2013 and Office Web Apps 2013 server. SharePoint site is running over https and office web apps running over http. Everything seems to be correct and able to view documents in browser. Once we tried to edit the

  • Scale and Crop - left with black bars

    In Final Cut Express, I know the concept of "scale and crop" but when I am scaling and cropping, I am still left with black bars on each side of the video. It seems that I am able to crop/scale the white background and the video but not the canvas. H

  • Setting linesize in SQL Plus

    Hi buddies; This is my 'special' situation with SQL Plus, when I seted a linesize to any value greater than 80, I cann't scroll to see the information displayed at the right. What can I do, to solve this problem. By the way, the scroll buttom appears

  • Have Flex3, Matrix3D Class is not found by Flex.

    Hello to who is reading this post! I have Flex3 (Downloaded from Adobe), the Matrix3D Class is not found by Flex.... no where not even under flash.geom.*. Do you have any thoughts of what my problem could be? Thanks in advance! Herendi Kristóf Pál