Inital commit for simple tools repo
This commit is contained in:
commit
8f862e91e0
7 changed files with 285 additions and 0 deletions
22
justify
Executable file
22
justify
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
aligncols="72"
|
||||
if [ $# -gt 0 ];
|
||||
then
|
||||
aligncols="$1"
|
||||
fi
|
||||
|
||||
TMPFILE="/tmp/justify.$USER.$$"
|
||||
|
||||
cat > $TMPFILE
|
||||
|
||||
length=`wc -l $TMPFILE`
|
||||
|
||||
echo ".ll $aligncols
|
||||
.pl $length
|
||||
.nh
|
||||
.fi
|
||||
`cat $TMPFILE`" | sed 's,\\,\\\\,g' | groff -kT utf8 | cat -s
|
||||
|
||||
rm $TMPFILE
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue