#! /bin/sh for LANG in `locale -a | grep -i 'utf.*8'` do export LANG if ./strcolltest 10 then echo $LANG good else echo $LANG BAD fi done