假設必要的 STREAMS 模組已與核心一起載入,您可以直接在 .cshrc 檔案 (C shell 範例) 中儲存下列指令行:
setenv LANG en_US.UTF-8
if ($?USER != 0 && $?prompt != 0) then
cat >! /tmp/mystreams$$ << _EOF
ttcompat
ldtterm
u8lat1
ptem
_EOF
/bin/strchg -f /tmp/mystreams$$
/bin/rm -f /tmp/mystreams$$
/bin/stty cs8 -istrip defeucw
endif
一旦您將這些指令行儲存至 .cshrc 檔案中,每次當您使用 STREAMS 模組時就不再需要輸入所有的指令。請注意,第二 _EOF 的起始位置必須位於檔案的第一個欄位。