Skip to content

Instantly share code, notes, and snippets.

@lucasburlingham
Created September 10, 2021 00:51
Show Gist options
  • Save lucasburlingham/798425e5d727ff30166b472739d926d2 to your computer and use it in GitHub Desktop.
Save lucasburlingham/798425e5d727ff30166b472739d926d2 to your computer and use it in GitHub Desktop.
Search Biblegateway from the command-line, opening results in the default browser
#!/bin/bash
# (C) Lucas Burlingham 2021
# MIT License
# Command-line client to Biblegateway
#
# Defaults to NASB if version is not specified
if [ -z "$1" ]; then
echo "Usage: "
echo " bible [Book] [Chapter:Verse-Verse] [Version]"
elif [ -z "$3" ]; then
# default to NASB
xdg-open "https://www.biblegateway.com/passage?search=$1+$2&version=NASB" &
exit
else
xdg-open "https://www.biblegateway.com/passage?search=$1+$2&version=$3" &
exit
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment