Permalink
Browse files

Merge pull request #1 from epixa/rm-so

Added rm-so tool for removing soap opera knowledge
  • Loading branch information...
2 parents 5716f04 + bd8f600 commit b35890173ad524a1e36d0fda40a9a4a1a516d3d4 @gwoo committed Mar 1, 2012
Showing with 45 additions and 0 deletions.
  1. +6 −0 lib/rm-so/README
  2. +10 −0 lib/rm-so/rm-so.sh
  3. +29 −0 lib/rm-so/test.sh
View
@@ -0,0 +1,6 @@
+rm-so: Remove Soap Operas
+
+This is a tool to remove at least a portion of the unsettlingly large amount of gwoo's mind
+that is dedicated to the names of daytime soap operas.
+
+USAGE: bash rm-sh /PATH/TO/MIND/FILE
View
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+if [ ! -n "$1" ]; then
+ echo "You must specify a path to gwoo's mind"
+ exit
+fi
+
+sed -i '' 's/days of our lives/legs/' $1
+sed -i '' 's/as the world turns/boobs/' $1
+sed -i '' 's/the young and the restless/ass/' $1
View
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+echo "Testing rm-so"
+
+test_path="/tmp/gwoo-rm-so-test"
+check_path="/tmp/gwoo-rm-so-test-check"
+
+echo "that last drink oh so many days ago
+the young and the restless
+days of our lives
+867-5309
+as the world turns" > $test_path
+
+echo "that last drink oh so many days ago
+ass
+legs
+867-5309
+boobs" > $check_path
+
+bash ./rm-so.sh $test_path
+
+if diff $test_path $check_path > /dev/null; then
+ echo " OK"
+else
+ echo " FAILED"
+fi
+
+rm $test_path
+rm $check_path

0 comments on commit b358901

Please sign in to comment.