19 lines
751 B
Plaintext
19 lines
751 B
Plaintext
|
#!/bin/bash
|
||
|
echo $header
|
||
|
ext=${file/*.}
|
||
|
range=10000
|
||
|
filename="/var/www/www.openmamba.org/$file"
|
||
|
[ "$page" -a $page -gt 0 ] || page=1
|
||
|
from=`expr \( $page - 1 \) \* $range + 1`
|
||
|
to=`expr $from \+ $range - 1`
|
||
|
if [ "$ext" = "log" -o "$ext" = "spec" -o "$ext" = "patch" -o "$ext" = "diff" ]; then
|
||
|
/bin/sed -n "${from},${to}p" $filename | /bin/sed -e 's|\&|\&|g' \
|
||
|
-e 's|<|\<|g' \
|
||
|
-e 's|>|\>|g' \
|
||
|
-e 's|\([[:alpha:][:digit:]]*\)\@[[:alpha:][:digit:]]*\.[[:alpha:][:digit:]\.]*|\1@...|g'
|
||
|
#'s|\&|\\&|g' -e 's|<|\<|g' -e 's|>|\>|g' -e 's|\([[:alpha:][:digit:]]*\)\@[[:alpha:][:digit:]]*\.[[:alpha:][:digit:]\.]*|\1@...|g' /var/www/www.openmamba.org/$file
|
||
|
else
|
||
|
/bin/sed -n "${from},${to}p" $filename
|
||
|
fi
|
||
|
exit 0
|