⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 erase.sh

📁 Shall高级编程
💻 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 + -