Skip to content

Instantly share code, notes, and snippets.

@pouyatafti
Created September 7, 2019 21:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pouyatafti/7cf95daa2f8715542fd4e05714341b2c to your computer and use it in GitHub Desktop.
Save pouyatafti/7cf95daa2f8715542fd4e05714341b2c to your computer and use it in GitHub Desktop.
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