#!/bin/sh ## ## 2002.04.03 ## 2002.04.06 patch ## ## create fonts.alias file ## ## check argument ## if [ $# -lt 2 ] ; then echo "usage : $0 " echo " ex) $0 'hyroundgothic' 'gulim'" exit 0 fi #from=hyroundgothic #to=gulim from=$1 to=$2 OIFS=$IFS IFS=' ' >fonts.alias i=0 for f in `xlsfonts -fn *-${from}-* 2>/dev/null` ; do echo -e "`echo $f | sed "s/-${from}-/-${to}-/"`\t\t$f" >> fonts.alias i=$(($i+1)) done if [ -s "fonts.alias" ] ; then echo "created $i font alias lines in 'fonts.alias' file." else rm -f fonts.alias fi IFS=$OIFS exit 0