Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'launch works for me' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
launch works for me
Authored by: Titanium Man on Jun 05, '02 12:37:14AM

I couldn't get the Applescript to work, but got launch to work. Here are a few possiblities of things you can do (launch will open them in your specified default browser):

#! /bin/sh

launch="/sw/bin/launch"
echo="/bin/echo"
sed="usr/bin/sed"

launch -l http://www.google.com/search\?hl=en\&q=$(echo "$*" | sed 'y/ /+/')


#! /bin/sh

launch="/sw/bin/launch"
echo="/bin/echo"
sed="usr/bin/sed"

launch -l http://whatis.techtarget.com/wsearchResults/1,290214,sid9,00.html?query=$(echo "$*" | sed 'y/ /+/')


/sw/bin/launch -l http://www.dictionary.com/search\?q="$*"

The first two shell scripts will look up a string on Google and Whatis.com respectively. The 'sed' bit takes spaces from your search string and inserts a + which is how it would appear if you had typed in a search string on the website. The last bit can be used as an alias to look up a word at dictionary.com (ie:
alias stupidalias='/sw/bin/launch -l http://www.dictionary.com/search\?q="$*"'
for bash or
alias stupidalias '/sw/bin/launch -l http://www.dictionary.com/search\?q="$*"'
for tcsh) Just my 2 cents.



[ Reply to This | # ]