- #!/bin/sh
- centena() {
- if [ $1 -lt 100 ]; then
- echo 0
- else
- echo $1 | cut -c1
- fi
- }
- k0=0
- timestamp=$(date +%c)
- sed -n -e 's,.*\[village\]\([0-9]\+\)|\([0-9]\+\)\[/village.*,\1 \2,p' -e 's,|, ,' |
- while read x y; do
- k="$(centena $y)$(centena $x)"
- echo $k $x $y
- done | sort -n | while read k x y; do
- if [ $k0 -ne $k ]; then
- echo ""
- echo "[b]Reservas |S.C| K$k[/b] [i]($timestamp)[/i]"
- k0=$k
- fi
- echo "[village]$x|$y[/village]"
- done
Untitled
Posted by Anonymous on Fri 2nd Jul 2010 11:47
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.