/[clonezilla-sysresccd]/trunk/www/chkNamedLinks
ViewVC logotype

Contents of /trunk/www/chkNamedLinks

Parent Directory Parent Directory | Revision Log Revision Log


Revision 46 - (show annotations)
Thu May 20 11:24:47 2010 UTC (11 years, 4 months ago) by sng
File size: 2490 byte(s)
updating scripts
1 #!/bin/bash
2 ##############################################################################
3 # #
4 # chkNamedLinks, (C) 2007-2010 S. Georgaras <sng@hellug.gr> #
5 # #
6 # This file is part of Clonezilla-SysRescCD. #
7 # #
8 # Clonezilla-SysRescCD is free software: you can redistribute it and/or #
9 # modify it under the terms of the GNU General Public License as published #
10 # by the Free Software Foundation, either version 2 of the License, or #
11 # (at your option) any later version. #
12 # #
13 # Clonezilla-SysRescCD is distributed in the hope that it will be useful, #
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
16 # GNU General Public License for more details. #
17 # #
18 # You should have received a copy of the GNU General Public License along #
19 # with Clonezilla-SysRescCD. If not, see <http://www.gnu.org/licenses/>. #
20 # #
21 ##############################################################################
22
23 count=0
24 cd working
25 grep -H '<[aA] [nN][aA][mM][eE]="' *.html | sed 's|\([^:]*\):\(.*\)|\2:\1|' | sed 's|.*[aA] [nN][aA][mM][eE]="||' | sed 's|"></[aA][^:]*:| - |' | sort
26 #grep -H '<[aA] [nN][aA][mM][eE]="' *.html| sed 's|.*[aA] [nN][aA][mM][eE]="||' | sed 's|"></[aA].*||' | sort
27
28
29
30 exit
31
32 for n in *.html;do
33 nameTop="$(grep '<[aA] [nN][aA][mM][eE]="' "$n" | grep '\-top">')"
34 if [ -n "$nameTop" ];then
35 name[$count]="$n"
36 nameTop[$count]="$nameTop"
37 else
38 echo "===$n === NO top NAME FOUND!!! ==="
39 exit 1
40 fi
41 ((count++))
42 done
43
44 count=0
45 while [ -n "${name[$count]}" ];do
46 echo -n "${name[$count]} -- "
47 theTop="$(echo "${nameTop[$count]}" | sed 's|<a name=\"||' | sed 's|-top.*||')"
48 echo "$theTop"
49
50
51 allNames="$(grep '<[aA] [nN][aA][mM][eE]="' "${name[$count]}"| sed 's|.*[aA] [nN][aA][mM][eE]="||' | sed 's|"></[aA].*||')"
52 echo "$allNames" | sed 's|^| |g'
53
54
55 ((count++))
56 done

Properties

Name Value
svn:executable *

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26