title: Boolean check not behaving as expected, bash/python
body: <p>When checking $date while using $grep, I am getting an unexpected result. I am using python with the os module to check a bash command's output.</p>
  <pre><code>if not
  </code></pre>
  <p>works, creates 1 file of the current date.</p>
  <pre><code>if
  </code></pre>
  <p>does not work, creates files for all days BUT current day.</p>
  <p>I would expect that if $date contains the string I am seeking, it would only create a file for that day, however the opposite occurs. Here is the function:</p>
  <pre><code>def write(self):
      
      #Formatting saved message
      msg = input(&quot;Enter a message: &quot;)
      current_time = datetime.now().strftime(&quot;%m/%d/%Y | %H:%M&quot;)
      x = '\n{0} - {1}\n'.format(current_time, msg)
  
      try:
  
          #Checking string contained in $date output
          options = (
              'Mon',
              'Tue',
              'Wed',
              'Thu',
              'Fri',
              'Sat',
              'Sun'
              )
          
          for option in options:
              
              #Here is the &quot;if not&quot; in question.
  
              if not os.system(f'date | grep -q {option}'):
                  y = option
  
                  os.system('var=~/reminder_notes\n'
                           f'if [ -e $var ]; then echo &quot;Writing to directory: ~/reminder_notes.&quot;\n'
                          
                            'else\n'
                              'mkdir $var &amp;&amp; echo &quot;Created directory: $var&quot;\n'
                            'fi'
                          )
                  os.system(f'echo &quot;{x}&quot; &gt;&gt; ~/reminder_notes/{y}.txt')
  
          print('\nMessage has been recorded.\n')
  
      except:
          print('\nAn error occured.')
  </code></pre>