mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-04 14:03:08 +02:00
20 lines
389 B
Bash
20 lines
389 B
Bash
|
|
#!/bin/bash
|
||
|
|
|
||
|
|
FILE="esej"
|
||
|
|
INTERVAL=2 # seconds between updates
|
||
|
|
PREV_COUNT=0
|
||
|
|
|
||
|
|
while true; do
|
||
|
|
pdflatex -interaction=nonstopmode $FILE.tex > /dev/null 2>&1
|
||
|
|
CURRENT_COUNT=$(pdftotext $FILE.pdf - | wc -m)
|
||
|
|
|
||
|
|
if [ "$CURRENT_COUNT" -ne "$PREV_COUNT" ]; then
|
||
|
|
clear
|
||
|
|
echo "Character count: $CURRENT_COUNT"
|
||
|
|
PREV_COUNT=$CURRENT_COUNT
|
||
|
|
fi
|
||
|
|
|
||
|
|
sleep $INTERVAL
|
||
|
|
done
|
||
|
|
|