updated antidote to newest state
This commit is contained in:
parent
6d40f3fa63
commit
f7cb8e5949
20 changed files with 343 additions and 269 deletions
20
dot_local/bin/executable_joke
Normal file
20
dot_local/bin/executable_joke
Normal file
|
@ -0,0 +1,20 @@
|
|||
##!/usr/bin/env bash
|
||||
|
||||
case "$1" in
|
||||
"dad")
|
||||
joke=$(/usr/bin/curl -sH "Accept: text/plain" 'https://icanhazdadjoke.com/')
|
||||
echo "Daily Dad Joke: $joke"
|
||||
;;
|
||||
"bofh")
|
||||
excuses_file="$HOME/.local/share/bofh"
|
||||
num_lines=$(nl "$excuses_file" | tail -n 1 | awk '{print $1}')
|
||||
echo -n "Daily BOFH Excuse: "
|
||||
awk 'NR=='$((1 + RANDOM % num_lines ))'{print;exit}' "$excuses_file"
|
||||
;;
|
||||
"hq")
|
||||
file="$HOME/.local/share/hackerquotes/$2"
|
||||
lines=$(nl "$file" | tail -n 1 | awk '{print $1}')
|
||||
echo -n "Daily Hackerquote: "
|
||||
awk 'NR=='$((1 + RANDOM % $lines ))'{print;exit}' "$file"
|
||||
;;
|
||||
esac
|
Loading…
Add table
Add a link
Reference in a new issue