Skip to content

Instantly share code, notes, and snippets.

@dvigne
Last active December 1, 2024 19:53
Show Gist options
  • Save dvigne/545e6df0e2a0826bc69c493c22838e89 to your computer and use it in GitHub Desktop.
Save dvigne/545e6df0e2a0826bc69c493c22838e89 to your computer and use it in GitHub Desktop.
An Extremely Small Bash Script to Grab the Current Headline for Today in Computer History.
echo "Today in Computer History:\n" > ~/cowsay.txt;
curl -s -k https://www.computerhistory.org/tdih/ | awk -F: '/chm-tdih-entry-title/ {gsub(/^[ \t]+/,"\n",$0); print; exit}' | sed -e 's/<[^>][^>]*>//g' -e '/^ -e *$/d' >> ~/cowsay.txt;
echo https://www.computerhistory.org/tdih/ >> ~/cowsay.txt;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment