From 57d9e16554b774bd9462a659b394692a2afae0f7 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Tue, 23 Dec 2014 11:10:47 -0500 Subject: [PATCH] cleanup --- four-words.coffee | 1 - purple-logs-word-frequency.bash | 13 +++++++++++++ word-frequency-here.bash | 13 ------------- 3 files changed, 13 insertions(+), 14 deletions(-) create mode 100755 purple-logs-word-frequency.bash delete mode 100755 word-frequency-here.bash diff --git a/four-words.coffee b/four-words.coffee index 433ddbb..5124253 100644 --- a/four-words.coffee +++ b/four-words.coffee @@ -16,6 +16,5 @@ async.parallel [ password = [] for i in [0..3] random = rnd[i] << 16 | rnd[i+1] << 8 | rnd[i+2] - console.log rnd[i], rnd[i+1], rnd[i+2], random password.push words[random % words.length] console.log password.join ' ' diff --git a/purple-logs-word-frequency.bash b/purple-logs-word-frequency.bash new file mode 100755 index 0000000..958e75f --- /dev/null +++ b/purple-logs-word-frequency.bash @@ -0,0 +1,13 @@ +#!/bin/bash + +find "$HOME/.purple/logs/" -type f -print0 \ + | xargs -0 grep -I --no-filename -v '(notice)' \ + | sed -e 's/<[^>]*>//g; s/ / /g; s/&[nm]dash;/-/' \ + | sed -ne "s/^(..:..:.. ..) [a-zA-Z0-9@ _.-]\{1,25\}: \(.*\)$/\1/p" \ + | perl -0777 -p -e's/\s+/\n/mg' \ + | grep -v '^&.*;$' \ + | sed -e 's/^\W\+//g; s/\W\+$//g' \ + | grep '^[a-z.'\''-]\{3,16\}$' \ + | sort \ + | uniq -c \ + | sort -nr diff --git a/word-frequency-here.bash b/word-frequency-here.bash deleted file mode 100755 index ee16c58..0000000 --- a/word-frequency-here.bash +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -find . -type f -print0 \ - | xargs -0 grep -I --no-filename -v '(notice)' \ - | sed -e 's/<[^>]*>//g; s/ / /g; s/&[nm]dash;/-/' \ - | sed -ne "s/^(..:..:.. ..) [a-zA-Z0-9@ _.-]\{1,25\}: \(.*\)$/\1/p" \ - | perl -0777 -p -e's/\s+/\n/mg' \ - | grep -v '^&.*;$' \ - | sed -e 's/^\W\+//g; s/\W\+$//g' \ - | grep '^[a-z.'\''-]\{3,16\}$' \ - | sort \ - | uniq -c \ - | sort -nr -- 1.7.10.4