Skip to content

Instantly share code, notes, and snippets.

@infertux
Created June 5, 2012 20:12
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 infertux/2877515 to your computer and use it in GitHub Desktop.
Save infertux/2877515 to your computer and use it in GitHub Desktop.
Kernel hackers quotes
#!/bin/bash
# Outputs some joyful hackers quotes.
# Count is 276 for v3.5-rc1-37-g99becf1 (2012-06-04).
# Path to the source
SOURCE=../Kernel
###
set -eu
FBOMBS="\b(fuck|bastard|crap|shit|damn|wtf)"
cd $SOURCE || { echo "Can't find the source, Luke!" >&2; exit 1; }
ack -hi $FBOMBS &
count=$(echo $( \
ack -ic $FBOMBS | awk -F: '{print $NF}' | tr "\n" '+' | sed '$s/.$//' \
) | bc)
wait
echo -e "\nCount: $count\n--\n$(git describe)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment