terminal command for current app

Discussion in 'Mac Basics and Help' started by sawmaster, Apr 9, 2009.

  1. sawmaster macrumors regular

    #1
    Hey.

    Is there a command for terminal to get the current application?

    Thanks!
     
  2. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #2
    No, because if you were doing this with Terminal the current application would always be "Terminal."

    If you want a list of processes currently running on your machine, type the command
    Code:
    top
     
  3. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #3
    :D

    Yes, the command is

    echo Terminal
     
  4. darelon macrumors newbie

    Joined:
    Nov 22, 2008
    #4
    @sawmaster - not completely sure this is what you're looking for, but you can get the path of the application that is frontmost using a shell command like this:
    Code:
    osascript -e 'POSIX path of (path to frontmost application)'
     
  5. sawmaster thread starter macrumors regular

    #5

    I know this topic is old, but i forgot to reply.

    I wanted to try to use PHP to get the current app using the shell (i forgot the exact name of it) function in php.
     

Share This Page