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

📄 read-r.sh

📁 Shall高级编程
💻 SH
字号:
#!/bin/bashechoecho "Enter a string terminated by a \\, then press <ENTER>."echo "Then, enter a second string (no \\ this time), and again press <ENTER>."read var1     # The "\" suppresses the newline, when reading $var1.              #     first line \              #     second lineecho "var1 = $var1"#     var1 = first line second line#  For each line terminated by a "\"#+ you get a prompt on the next line to continue feeding characters into var1.echo; echoecho "Enter another string terminated by a \\ , then press <ENTER>."read -r var2  # The -r option causes the "\" to be read literally.              #     first line \echo "var2 = $var2"#     var2 = first line \# Data entry terminates with the first <ENTER>.echo exit 0

⌨️ 快捷键说明

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