Hébergement
Forum
#!/bin/bash
if test $# -lt 1 ; then
echo "usage: meta [-s min_occurence ] <filename>"
fi
if test "$1" = "-s" && test $# -ge 3 ; then
export SEUIL="$2"
else
export SEUIL="3"
fi
while test $# -gt 0 ; do
echo "^[[31m$1^[[30m"
awk '
BEGIN {
FS="[ \t,:.!?\)\(]+"
}
/<meta name="keywords"/ {
gsub(/^.+content="/,"")
gsub(/">.*$/,"")
l = split($0,a,/ *, */)
for ( i in a ) {
m[a[i]] = 0
}
}
/<body/ { status = 1 }