Skip to content

Instantly share code, notes, and snippets.

@pouyatafti
Created Sep 7, 2019
Embed
What would you like to do?
shell script for browsing the web using links
#!/bin/sh
homepage="https://nohup.io/b.html"
cmd=$1
shift
case $cmd in
h)
url=$homepage
;;
g)
url="https://google.com/search?q=$*"
;;
wp)
url="https://en.wikipedia.org/wiki/$*"
;;
git)
url="https://github.com/search?q=$*#start-of-content"
;;
hn)
url="https://news.ycombinator.com"
;;
bbc)
url="https://www.bbc.co.uk/news#skip-to-content-link-target"
;;
bbc-fa)
url="https://bbcpersian.com"
;;
ft)
url="https://ft.com"
;;
*)
url="$cmd"
;;
esac
links "$url"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment