#!/bin/sh # # convhtml : .txt to .html converter. # # usage: for a file ending with the ".txt" extension: # convhtml file_name # # it will output a file named file_name.html # # June 19, 1998 # Revised in May 23, 2002 # Ilker Ficicilar - ilkerf@geocities.com # # if [ "$1" != "" ] then if test -f $1.txt then nm=$1 echo "
EOF11
cat $1.txt | sort | tail -38 | wc | while read dg
do
set $dg
satir=`expr $3 / $1`
set $nm
satir=`expr $satir + 15`
echo "satir= $satir"
#
# ">" ve "<" karakterlerini donusturerek yaziyi oku/tara.
#
cat $1.txt | sed "s/>/\>/g" | sed "s/\</g" | while read qw
do
#
# Eger bir satir bos ise paragraf atlatmasi yapilacak
#
if [ "$qw" != "" ]
then
#
# bos degilse, satir uzunlugunu sapta.
# amacimiz kisa satirlarin ard arda eklenerek cirkin gorunmesini engellemek.
#
echo "$qw" | wc -c | while read we
do
#
# bir satir 67 karakterden fazla ise yeterince uzundur diye varsaydim.
#
#echo "$qw"
set $qw
while [ "$1" != "" ]
do
deg="`echo $1 | cut -f1 -d\:`"
if [ "$deg" != "http" ]
then
echo -n $1" "
else
lnk="`echo $1 | cut -f1 -d\'`"
echo "$1"
fi
#echo "$1" | grep "http://" | while read gh
#do
#echo "" "$gh" ""
#done
#echo "$1" > .tmp.convhtml2
#if grep "http://" .tmp.convhtml2 > /dev/null
#then
#echo " "
#else
#echo "$1"
#fi
shift
done
if [ "$we" -lt $satir ]
then
echo " " # # bu er degiskeni, programin ileriki surumlerinde gerekebilir. # simdilik durmasinda bir sakinca yok. # er=kisa else er=uzun fi done else echo " " fi done >> $1.html echo >> $1.html # # evet isimiz bitti # echo " |