[pdfgrep-users] pdfgrep output too wide for screen, truncated when piped
                
                Brought to you by:
                
                    rootzlevel
                    
                
            
            
        
        
        
    | 
     
      
      
      From: John-Eric <joh...@gm...> - 2014-11-24 04:15:41
      
     
   | 
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font face="Courier New, Courier, monospace">I'm having trouble with
      pdfgrep output too wide to see on screen.<br>
      Any attempt to suppress extra spaces truncates the values at the
      end of each line.<br>
      How can I squeeze the spaces and keep the values?<br>
      <br>
      >>>>> pdfgrep AcmeWidgets *.pdf<br>
      <br>
      CapitalOne 2014-11.pdf:   11 02 NOV AcmeWidgets SAN
      ANTONIOTX                                             24.50<br>
      Chase Amazon 2014-01.pdf:   01/19                   AcmeWidgets
      SAN ANTONIO TX                                             21.12<br>
      Chase Amazon 2014-03.pdf:   03/21                   AcmeWidgets
      SAN ANTONIO TX                                             18.45<br>
      Chase Amazon 2014-03.pdf:   03/21                   AcmeWidgets
      SAN ANTONIO TX                                             20.66<br>
      Chase Amazon 2014-06.pdf:   06/15                   AcmeWidgets
      SAN ANTONIO TX                                             26.50<br>
      Chase Amazon 2014-08.pdf: 07/24                     AcmeWidgets
      SAN ANTONIO TX                                             22.48<br>
      Chase Amazon 2014-09.pdf: 08/26                     AcmeWidgets
      SAN ANTONIO TX                                             17.56<br>
      Chase Amazon 2014-09.pdf: 08/25                     AcmeWidgets
      SAN ANTONIO TX                                             21.52<br>
      Chase Amazon 2014-10.pdf: 10/05                     AcmeWidgets
      SAN ANTONIO TX                                             28.45<br>
      Chase Amazon 2014-10.pdf: 10/10                     AcmeWidgets
      SAN ANTONIO TX                                             18.45<br>
      <br>
=============================================================================<br>
      This is what I get when I pipe the output and squeeze multiple
      spaces to a single space.<br>
      Now I have the right width, but the values at the end of each line
      are missing.<br>
      <br>
      >>>>> pdfgrep AcmeWidgets *.pdf | tr -s ' '<br>
      <br>
      CapitalOne 2014-11.pdf: 11 02 NOV AcmeWidgets SAN ANTONIOTX<br>
      Chase Amazon 2014-01.pdf: 01/19 AcmeWidgets SAN ANTONIO TX<br>
      Chase Amazon 2014-03.pdf: 03/21 AcmeWidgets SAN ANTONIO TX<br>
      Chase Amazon 2014-03.pdf: 03/21 AcmeWidgets SAN ANTONIO TX<br>
      Chase Amazon 2014-06.pdf: 06/15 AcmeWidgets SAN ANTONIO TX<br>
      Chase Amazon 2014-08.pdf: 07/24 AcmeWidgets SAN ANTONIO TX<br>
      Chase Amazon 2014-09.pdf: 08/26 AcmeWidgets SAN ANTONIO TX<br>
      Chase Amazon 2014-09.pdf: 08/25 AcmeWidgets SAN ANTONIO TX<br>
      Chase Amazon 2014-10.pdf: 10/05 AcmeWidgets SAN ANTONIO TX<br>
      Chase Amazon 2014-10.pdf: 10/10 AcmeWidgets SAN ANTONIO TX<br>
    </font><br>
    <font face="Courier New, Courier, monospace"><font face="Courier
        New, Courier, monospace">=============================================================================<br>
      </font>I tried using other commands with the same results:<br>
      sed ===> pdfgrep AcmeWidgets *.pdf | sed 's/ \+/ /g'<br>
      awk ===> pdfgrep AcmeWidgets *.pdf | awk '{print $1, $2, $3,
      $4, $5, $6, $7, $8, $9, $10;}'<br>
      <br>
    </font><font face="Courier New, Courier, monospace"><font
        face="Courier New, Courier, monospace">The values also get
        truncated when I try to pipe the output to a file.<br>
      </font>>>>>> </font><font face="Courier New,
      Courier, monospace"><font face="Courier New, Courier, monospace">pdfgrep
        AcmeWidgets *.pdf > output.txt<br>
      </font><br>
      Could you <font face="Courier New, Courier, monospace">add a
        squeeze space/tabs option? </font>Any other suggestions?<br>
      <br>
    </font>
  </body>
</html>
 |