home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume8
/
roff_bl
/
roff
< prev
Wrap
Text File
|
1989-09-23
|
599b
|
35 lines
# roff by Brian E. Litzinger
TROFF=eroff
TMP=/tmp/roff$$
for file in $*
do
case $file in
-*)
args="$args $file"
;;
*)
command_line="`head -1 $file`"
b="`echo $command_line | cut -c1-8`"
if [ "$b" != '\" exec ' ] ; then
echo "$file not roff format file!"
exit 2
fi
command="`echo $command_line | cut -c9- `"
d="sed -e '1d' $file |"
for i in $command ; do
if [ "$i" = '$F' ] ; then
true
else
if [ "$i" = "$TROFF" ] ; then
d="$d $i $args"
else
d="$d $i"
fi
fi
done
#echo $d
eval $d
;;
esac
done