#! /bin/sh # # wrappper nkf filter for cvs-server/windoze-clients 2 # # Usage: wrapnkf kanji_code infile [outfile] # NKF=/usr/bin/nkf # Line Terminator: CR/LF->LF(-Lu), LF->CR/LF(-Lw): No use # Kanji Code: SJIS(-s), EUC(-e) including hankaku->zenkaku TR=/usr/bin/tr # Cntl-Z=\032(0x1a) opt=$1 infile=$2 outfile=$3 if [ ${opt} = "-e" ] ; then ${NKF} -eLu ${infile} | ${TR} -d '\032' > /tmp/unkf-cvs$$ mv -f /tmp/unkf-cvs$$ ${outfile} elif [ ${opt} = "-s" ] ; then ${NKF} -s ${infile} > /tmp/wnkf-cvs$$ mv -f /tmp/wnkf-cvs$$ ${infile} else echo "Usage: wrapnkf [-s|-e] infile [outfile]" fi;