title: extract mysql queries from log files between tab spaces and newlines
body: <p>i have a big log file having mysql logs. First is the timestamp of the query then the type i believe and then the actual query that has been made to the database.<br>
  and example is this  </p>
  
  <p><code>2018-12-07T08:45:12.653298Z(tabspace)(more spaces here)493(space)Query(tabspace)SHOW TABLES FROM <code>test_c</code>(newline)</code>  </p>
  
  <p>the problem is that for big queries the log uses more (newlines) so 1 log of a query could span over several lines. So it would be something like the following    </p>
  
  <p><code>2018-12-07T08:45:12.931589Z      22 Query SELECT nav
              FROM main_nav
              WHERE 'main/index' LIKE CONCAT(url, '%')
                  OR '/main/index/' LIKE CONCAT(url, '%')
                  OR '/main/index' LIKE CONCAT(url, '%')
                  OR 'main/index' LIKE CONCAT(url, '%')
              ORDER BY LENGTH(url) DESC</code></p>
  
  <p>what i am trying to make is extract just the queries to a single file with every query in a single line and i am failing to make it happen.  </p>