made a few tweaks to make the script behave better:
- turned on
shopt -s nullglob
so the loop skips*.mediawiki
when there are no files. - put quotes around
$fname
ingrep
so filenames with spaces don’t break things. - switched
if [ "$GRES" != "" ]
toif [ -n "$GRES" ]
— just cleaner and more reliable.