Divide number from wc in bash + batch
<p>So I'm trying to loop over a bunch of PDF files, grab their character count and divide that by 5. So output should be something like this:</p>

<pre><code>PDF1.pdf
400

PDF2.pdf
1000
</code></pre>

<p>Assuming <code>PDF1.pdf</code> has 2000 characters and <code>PDF2.pdf</code> has 5000 characters. This is what I'm currently doing:</p>

<pre><code>for %%f in (*.pdf) do (
    echo %%~nf.pdf
    pdftotext %%~nf.pdf -enc UTF-8 - | wc -m
)
</code></pre>

<p>What I really seek help with, is grabbing the value from <code>wc -m</code>, divide that by 5 and echo it out.</p>

<p>I've tried various things such as <code>SET /A total=(wc -m) / 5</code> but nothing really seems to work out.</p>