Skip to content

Instantly share code, notes, and snippets.

@stelcheck
Created July 11, 2013 01:22
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 stelcheck/5971755 to your computer and use it in GitHub Desktop.
Save stelcheck/5971755 to your computer and use it in GitHub Desktop.
Pretty print QOTD server quote on shell open
#!/usr/bin/env bash
if [ ! -d ~/.bash.d ]; then
pushd ~;
git clone https://github.com/stelcheck/libbash.git .bash.d;
popd;
fi
. ~/.bash.d/colorize.sh
. ~/.bash.d/networking.sh
echo " ------------------------------------------" | yellow;
echo "" \
| tcp ota.iambic.com 17 \
| tail -n1 \
| sed "s/\|/\\`echo -e '\n\r '` --/" \
| fold -s -w 40 \
| (while read line; do echo " ${line}" | green; done) \
;
echo " ------------------------------------------" | yellow;
echo "";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment