File:  [Local Repository] / reports / findlinks.sh
Revision 1.3: download - view: text, annotated - select for diffs - revision graph
Sun Aug 1 05:26:59 2004 UTC (19 years, 9 months ago) by boris
Branches: MAIN
CVS tags: HEAD
Fixed long arg list

#!/bin/sh
#
# Find links to the current document.
#
#list=`grep -l href=\"$1\" *.html|sed 's/head.html//'| sed 's/tail.html//'`
list=`find . -name "*.html" -print0 | xargs -0 grep -l href=\"$1\" |sed 's/head.html//'| sed 's/tail.html//' | sed 's/\.\///'`
len=`echo $list |wc -w`
if [ $len -gt 0 ]; then
    echo "<small>óÍ. ÔÁËÖÅ: "
    for x in $list; do
	echo '&nbsp; <a href="'$x'">'$x'</a>'
    done
    echo "</small>"
fi
exit 0

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>