Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 10th, 2011  |  syntax: Bash  |  size: 0.42 KB  |  views: 201  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash
  2. DBFILENAME='/usr/share/opera-adblock-complete/urlfilter.ini'
  3. TMPFILENAME='/tmp/opera-adblock-urlfilter.ini'
  4. if [ -f "$DBFILENAME" ]; then
  5.         if [ -f "$TMPFILENAME" ]; then
  6.                 rm $TMPFILENAME
  7.         fi
  8.         IFS=$'\n'
  9.         for LINE in $(<$DBFILENAME); do
  10.                 if [[ -n "$USERFILERS"  ]]; then
  11.                         echo "$LINE" >> $TMPFILENAME
  12.                 else
  13.                         if [[ "$LINE" = "#UsersOwnFiltersHere" ]]; then
  14.                                 USERFILERS=true
  15.                         fi
  16.                 fi
  17.         done
  18. fi