#!/bin/bash
# lll - Starts Links with a ToSurf-startpage.
# Copyright (C) Sam Okt 20 15:06:25 MEST 2001 - now by Ingo Blechschmidt.
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Ingo Blechschmidt
# Arberstra&szlig;e 5
# 86179 Augsburg
# E-Mail: iblech@web.de, http://www.way.to/uselinux/
# Tel.: +49 / 821 882955
#
#

cd $HOME
NOTS=`cat ~/.links/bookmarks | gawk -F \| '{ print "<A HREF=\""$2"\">"$1"</A><BR>"; }'`
echo "s+XXXcccXXX+$NOTS+"
# his by Mon Okt 22 15:04:23 MEST 2001!
HIS=`tail -n 8 ~/.links/links.his | gawk '{ print "<A HREF=\"http://"$0"\">"$0"</A><BR />";
}'`
echo "s+CCCxxxCCC+$HIS"
cat ~/.links/startpage.html | perl -ne "s-XXXcccXXX-$NOTS-; s-CCCxxxCCC-$HIS-; print; " > /tmp/$$ls.html
links /tmp/$$ls.html && rm /tmp/$$ls.html



