Skip to content

Instantly share code, notes, and snippets.

@pouyatafti
Created September 7, 2019 21:53
Show Gist options
  • 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