shell script から telnet で skkserv につないで
漢字を変換したいんですが、

echo "1やま\n0" |telnet localhost skkserv

こんな感じの pipe ではできないです。
うまい方法はないでしょうか。