?? erase.sh
字號:
#!/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."exit 0# Even after the script exits, the new key value remains set.# Exercise: How would you reset the erase character to the default value?
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -