inputbox6-utf8

来自「This version of dialog, formerly known a」· 代码 · 共 37 行

TXT
37
字号
#!/bin/sh# $Id: inputbox6-utf8,v 1.1 2003/08/15 19:40:37 tom Exp $: ${DIALOG=dialog}tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/test$$trap "rm -f $tempfile" 0 1 2 5 15case none"$LANG$LC_ALL$LC_CTYPE" in*UTF-8*)	;;*)	echo "This script must be run in a UTF-8 locale"	exit 1	;;esac$DIALOG \--title    `printf "\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a"` \--inputbox `printf "\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a"` \10 20 2>$tempfileretval=$?case $retval in  0)    echo "Input string is \"`cat $tempfile`\"";;  1)    echo "Cancel pressed.";;  255)    if test -s $tempfile ; then      cat $tempfile    else      echo "ESC pressed."    fi    ;;esac

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?