erase.sh
来自「一本完整的描述Unix Shell 编程的工具书的所有范例」· Shell 代码 · 共 18 行
SH
18 行
#!/bin/bash# erase.sh: Using "stty" to set an erase character when reading input.echo -n "What is your name? "read name # Try to backspace #+ to erase characters of input. # Problems?echo "Your name is $name."stty erase '#' # Set "hashmark" (#) as erase character.echo -n "What is your name? "read name # Use # to erase last character typed.echo "Your name is $name."# Warning: Even after the script exits, the new key value remains set.exit 0
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?