/ Published in: Bash
URL: http://www.commandlinefu.com/commands/view/7772/query-wikipedia-via-console-over-dns
Expand |
Embed | Plain Text
#! /usr/bin/env bash # wikish.sh # Query Wikipedia via console over DNS. # Reproduced without author's permission. # From commandlinefu.com: # http://www.commandlinefu.com/commands/view/7772/query-wikipedia-via-console-over-dns scriptname=$(basename $0) if [ -z "$1" ] then echo -e "\tSyntax: $scriptname <Keywords>" echo -e "\tExampl: $scriptname 'bash shell'" exit else keyword=$(echo $*|tr ' ' '_') dig +short txt $keyword.wp.dg.cx fi
You need to login to post a comment.
