Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

run terminal commands from quicksilver

I know there is a Terminal plugin for quicksilver but I would invoke terminal commands which basically just runs in the background and never popups a terminal window. is that possible?

UPDATE:

I have the following code in my applescript but its giving me an error:

do shell script "/path/to/shell.sh blah" 

error:

curses.setupterm()
_curses.error: setupterm: could not find terminfo database
like image 834
user140736 Avatar asked Feb 19 '11 01:02

user140736


3 Answers

Applescript is the simple solution, see: http://developer.apple.com/library/mac/#technotes/tn2002/tn2065.html

Sample:

do shell script "ifconfig"
do shell script "ifconfig" user name "Anne" password "p@ssw0rd" with administrator privileges

Automator can also run shell scripts in the background.

If you are familiar with XCode, you can use NSTask with Objective-C.

like image 177
Anne Avatar answered Sep 28 '22 01:09

Anne


In Quicksilver you can use the action "Run Command in Shell", which is part of the "Terminal Module". The command is run without showing a window. Search on the quoted terms and you'll find some examples.

like image 29
slothbear Avatar answered Sep 28 '22 01:09

slothbear


Hold on a sec, is your shell script a bash shell script? In your first line do you have:

#!/bin/bash

If not, add that line to your script. Also instead of just

do shell script "/path/to/yourscript.sh"

consider this:

do shell script "/bin/bash /path/to/yourscript.sh"
like image 26
chutsu Avatar answered Sep 28 '22 02:09

chutsu