Are there any apps/addons that will let me fire off a single command ?

Discussion in 'macOS' started by gjarold, Apr 11, 2011.

  1. gjarold macrumors regular

    Joined:
    Nov 14, 2007
    #1
    On a fairly regular basis I need to fire off a quick, no-output command ... like:

    killall ssh
    kill -HUP `pidof Sonos`
    knock server.com 20 40 60
    umount /dev/md0

    and so on ... these are very simple, one line unix commands that have no output, and I don't really need to fire up terminal, run it, close terminal, etc.

    I'd really love to just hit F10 or something and type into a dialog that comes up (or pops up on the bottom of the screen, etc.)

    Does anyone know of any applications or addons that give me that functionality ?

    In a way it is like the start menu -> run function in windows - just a place to type in a quick one-off command...

    Thanks for any suggestions.
     
  2. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #2
    You can run terminal commands from within the launcher app Alfred. You will need the paid "powerpack" version though.

    Screencap.

    [​IMG]
     
  3. Mal macrumors 603

    Mal

    Joined:
    Jan 6, 2002
    Location:
    Orlando
    #3
    I use Visor with the Terminal. I just have Terminal launch at login, Visor causes it to hide, then I hit the quick key (I use Control-~, but you can set it to almost anything), and it drops down ready to use.

    http://visor.binaryage.com/

    jW
     
  4. gjarold thread starter macrumors regular

    Joined:
    Nov 14, 2007
    #4

    Ok, this looks promising. Just a hotkey that you configure to pop up the terminal prompt you showed ?
     
  5. milbournosphere macrumors 6502a

    milbournosphere

    Joined:
    Mar 3, 2009
    Location:
    San Diego, CA
    #5
    You could also write a shell script to do just that. No app required, just use vim or another command line editor to write what you need. all you need to do is run it from the cmd line, or even better, set up a cron job to schedule your script to run at a set time.

    It sounds like you're already well versed in the cmd line, so it should be pretty trivial for you to pick up the idea of shell scripting.
     
  6. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #6
    You would activate Alfred by a KB combo... I use CMD-space. Then type > and it activates terminal entry mode as shown in my cap. From there you can directly enter commands to send to terminal.
     
  7. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #7
    Update for the OP. I noticed this post today from the Alfred dev that might interest you. Looks like this would do what you want.
     

Share This Page