Created
November 18, 2012 22:59
-
-
Save jbedo/4107982 to your computer and use it in GitHub Desktop.
Like fmt(1) but intended for TeX. Terminates sentences with newline.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env rc | |
. 9.rc | |
f=/tmp/fmt.$pid | |
fmt -l9999 | sed -e 's/([;\.])[ ]+/\1\n/g' > $f | |
cat $f | while(line=`{read}){ | |
if(! ~ $line "" ) | |
echo $line | fmt $* | |
} | |
rm $f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment