You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
517 B

#!/bin/bash
# this script is designed to run from the $destdir
# of the 'dsbfnr' script
cd r || exit 1
echo
echo "== free rooms: =="
echo
for i in *.htm; do
LNC="$(rg -F "<TABLE><TR><TD></TD></TR></TABLE>" "$i" | wc -l)"
if expr "$LNC" '>' 54 &>/dev/null; then
continue
fi
RDESC="$(rg -C 3 -Fx "</font>" "$i" | head -n 3)"
echo -e "$(basename -s .htm "$i")\\t$LNC\\t$(echo "$RDESC" | head -n 1 | tr -cd '[[:print:]]')\\t$(echo "$RDESC" | tail -n 1 | tr -cd '[[:print:]]')"
done | sort -n -b -r -k 2