次の変換スクリプトは、Solaris 8 リリースが動作するシステムでだけ実行できます。
NIS+ マスターにスーパーユーザーとしてログインします。
たとえば /tmp/convert という名前で次の変換スクリプトをシステムにコピーします。
#!/bin/sh
#
# Copyright (C) 1999 by Sun Microsystems, Inc.
# All Rights Reserved
#
PRINTER=""
for LINE in `lpget -n xfn list | tr "¥t " "^A^B"` ; do
LINE=`echo ${LINE} | tr "^A^B" "¥t " | sed -e 's/^ ¥t//g'`
case "${LINE}" in
*:)
PRINTER=`echo ${LINE} | sed -e 's/://g'`
;;
*=*)
lpset -n nisplus -a "${LINE}" ${PRINTER}
;;
esac
done
|
カット&ペーストを使用してこのスクリプトのテキストファイルを作成する場合は、2 つある ^A^B (caratAcaratB) シーケンスを Control A Control B に変更してください。
スクリプトを実行可能ファイルにします。
# chmod 755 /tmp/convert |
変換スクリプトを実行します。
# /tmp/convert |