Small script for YubNub

Posted February 22nd, 2006 by konrad

EN: A recent NewsForge article introduces into the advantages of YubNub – “a (social) command line for the web”. I personally use the firefox keyword search a lot, but the advanced syntax of YubNub seems to offer more and you don’t have to create a local keyword for every search site you use. So I will give YubNub a try in the next days.

Unfortunately the link to a shell script in the article is broken so I wrote a short query script myself:

#!/bin/sh
BROWSER=firefox # you can use w3m to get output in the shell
COMMAND=$(echo $* | sed -e 's/ /+/g') 
$BROWSER http://yubnub.org/parser/parse?command=$COMMAND

Copy it into a file (e.g. yubnub.sh) and make it executable. The script runs fine with ksh and bash for my test searches. Some examples:

$ yubnub.sh wp peace
$ yubnumb.sh man ls
$ yubnumb.sh ls
$ yubnub.sh sing Johnny Cash Desperado

2 Responses to “Small script for YubNub”

  1. Reece B. Theobald

    A windows batch file to launch yubnub from the windows environment. It takes a maximum of 9 params.

    @echo off

    set BROWSER=”C:\Program Files\Internet Explorer\IEXPLORE.EXE”
    start %BROWSER% “http://yubnub.org/parser/parse?command=%1 %2 %3 %4 %5 %6 %7 %8 %9”

    Copy it into a file (e.g. yubnub.bat) and put it in your c:\windows\system32 folder.

    Example:
    yubnub passwd 8

  2. Jonathan

    konrad, reece – thanks!

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>