-
-
Save pouyatafti/7cf95daa2f8715542fd4e05714341b2c to your computer and use it in GitHub Desktop.
shell script for browsing the web using links
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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