Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Commands & Shells

Duck Duck Go Search from Shell

Submitted by on August 5, 2018 – 4:10 pm

The ddgr python script is a command line interface for Duck Duck Go  – a privacy-oriented search engine that, unlike Google, will not give away your data to the likes of Cambridge Analytica. In the past year Duck Duck Go has grown and matured and now is a serious player in the Web search field.The ddgr tool uses Python 3, so if, like myself, you dislike SystemD and still clinging to CentOS 6, you would need to get Python 3 installed on your machine in a way that’s not gonna mess with the native version of Python. Here’s the process that worked for me:

cd /usr/src
wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz
tar xzf Python-3.6.4.tgz
cd Python-3.6.4
./configure --enable-optimizations
make altinstall
rm /usr/src/Python-3.6.4.tgz
ln -s /usr/local/bin/python3.6 /usr/bin/python3

Now all you need is to clone the ddgr repo from GitHub and copy the executable to an appropriate location:

sudo su -
cd ~
git clone https://github.com/jarun/ddgr.git
cd ddgr
/bin/cp -p ddgr /usr/bin/ddgr
chmod 755 /usr/bin/ddgr

You can get the online help for the utility like so:

ddgr --help

A couple of basic examples:

ddgr --noprompt --num 20 --expand "ddgr"

ddgr --noprompt --num 25 --expand "Donald John Trump" | \
grep -iP "b[oi]r[tn](h)?|d(\.)?o(\.)?b(\.)?"

 

Print Friendly, PDF & Email

Leave a Reply