petits-scripts-persos/ddg

11 lines
285 B
Plaintext
Raw Normal View History

2022-07-04 14:31:50 +00:00
#!/bin/sh
2022-07-04 14:35:26 +00:00
function join_by { local IFS="$1"; shift; echo "$*"; }
2022-07-04 14:31:50 +00:00
if [ "$#" -eq 0 ] ; then
echo "WARNING! All your communication will bypass VPN and firewall!"
su no-fw -c 'lynx http://detectportal.firefox.com'
else
lynx "https://duckduckgo.com/?q=$(join_by '+' $@ )&t=ffab"
fi