hello im trying to make a shell script that "downloads" links and topic that is to the link but i cant make it work. It is supposed to get the urls from a txt file or a file.
IFS=`echo -e "\n\r"`
for I in `cut -f1 $1`
do
source=$(echo $I)
echo "Kilde: $source"
lynx -dump $source > /tmp/temp
if test -z $1; then
echo "fd"
fi
hva=$(cat /tmp/temp | grep "[0-9]. http://") #| cut -d'.' -f1 | sed -e s/\ //g )
for nr in $hva
do
#echo "-$nr-"
nummer=$(echo $nr | cut -d. -f1 | sed -e "s/\ //g")
over=$(cat /tmp/temp | grep -G "[[]$nummer[]]" | head -n 1| cut -d']' -f2)
url=$(cat /tmp/temp | grep -G "$nummer. http://" | cut -d. -f 2- | tail -n 1) # | sed -e "s/\ //g")
#echo "<a href=\"$url\">$over</a><br>"
echo "<a href=\"$url\">$over</a><br>"
done
done
rm /tmp/temp
if any1 can solve this thing idd be greatfull