Find the answer to your Linux question:
Page 5 of 5 FirstFirst 1 2 3 4 5
Results 41 to 42 of 42
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #41

    That's because there is a literal 'backslash' (which is probably being used as a line continuation character) in the text file - it needs to be "escaped" so that grep can handle it.

    Change these lines:
          if [ -f whitelist.txt ]; then
            cat whitelist.txt|grep -q "$phrase" && continue
    to this:
          if [ -f whitelist.txt ]; then
            grepphrase=$(echo $phrase|sed -e 's|\\||g')
            cat whitelist.txt|grep -q "$grepphrase" && continue

  2. #42
    thanks for all of your help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts