Usage: conv2html servicelist_201.txt servicelist201.html
#! /bin/bash
if [ $# -eq 0 ] ; then
echo "USAGE: $(basename $0) file1 file2 file3 ..."
exit 1
fi
file=$1
html=$(echo $file | sed 's/\.txt$/\.html/i')
echo "" > $html
echo " " >> $html
echo " " >> $html
while read line ; do
echo "$line
" >> $html
done < $file
echo " " >> $html
echo "" >> $html
#! /bin/bash
if [ $# -eq 0 ] ; then
echo "USAGE: $(basename $0) file1 file2 file3 ..."
exit 1
fi
file=$1
html=$(echo $file | sed 's/\.txt$/\.html/i')
echo "" > $html
echo " " >> $html
echo " " >> $html
while read line ; do
echo "$line
" >> $html
done < $file
echo " " >> $html
echo "" >> $html
No comments:
Post a Comment