shell中使用read如何换行
来源:互联网 发布:java decompiler使用 编辑:程序博客网 时间:2024/05/19 23:27
例如:
read -p $'Please Enter the percent [30 between 100]\x0a The value is Default = 80 :' scale_percent
we use above syntax to insert hex values, we insert \x0a
which is the hexadecimal value of the newline character (LF). You can use same syntax above with echo
to produce new lines, eg:
echo $'One line\x0asecond line'
This is a feature of BASH 2, it is documented here, the $''
is used to translate all escape sequences inside it for its ascii transcription. So we could obtain the same result of example above, this way:
echo $'One line\nsecond line'
注意要用单引号
阅读全文
0 0
- shell中使用read如何换行
- shell中read命令
- linux shell中read
- shell中read参数
- shell中read参数
- shell中read
- shell中read用法
- shell--read使用
- clistctrl 中如何换行
- echo中如何换行
- 如何在RowEditing中使用TextArea时回车可以换行
- shell 脚本命令太长,如何换行?
- shell脚本中当某行命令输入过长时如何换行?
- shell编程中如何计算使用除法
- awk中如何使用shell的环境变量
- awk中如何使用shell的环境变量
- awk中如何使用shell的环境变量
- vim中如何使用shell指令
- PHP魔术方法汇总
- iOS,iOS10 跳转系统设置、WIFI、蓝牙…
- POJ 2195 Going Home 最小费用最大流(模板题)
- (72)资源和包
- C#学习笔记(三)—–C#高级特性:可空值类型
- shell中使用read如何换行
- 设置Eclipse中的tab键为4个空格的方法!
- Elon Musk的OpenAI用VR训练机器人:解锁更多复杂动作!
- PHP 面向对象
- 【干货】PHP底层的运行机制与原理
- HDU1272小希的迷宫(并查集)
- Java时间格式转换大全
- W5500在单片机中的测试及长字节的发送和接收
- php header函数常见用途