Advertisement
shadowsofme

filterNoiseWords

Dec 6th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.22 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. function next() {
  4.     for s in $*; do
  5.         echo $s;
  6.         break;
  7.     done;
  8. }
  9.  
  10. while read line
  11. do
  12.     disallowed=$(<"$1")
  13.     if ! [[ "$disallowed" == *"$(next $line)"* ]] ; then
  14.         echo $line;
  15.         sort -u;
  16.     fi;
  17.    
  18. done;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement