title: Using tee and jq to write txt and json log files
body: <p>I'd like to write two log files using tee, first log file as txt, second log file as json</p>
  
  <p>Tee is working for two txt files, but can't get jq to work with tee...</p>
  
  <p>My code:</p>
  
  <pre><code>logfilename="log_download_2017"
  echo "start process $(date -u)" | tee -a $logfilename.txt &gt;&gt; jq . $logfilename.json
  echo "logfilename" $logfilename | tee -a $logfilename.txt &gt;&gt; jq . $logfilename.json
  </code></pre>
  
  <p>Console output:</p>
  
  <p><code>tee: .: Is a directory
  tee: .: Is a directory</code></p>
  
  <p>Log files output:</p>
  
  <p><code>start process Mon May 15 03:14:09 UTC 2017
  logfilename log_download_2017</code></p>