echo换行
来源:互联网 发布:模糊算法 疲劳识别 编辑:程序博客网 时间:2024/06/04 19:36
echo要支持同C语言一样的\转义功能,只需要加上参数-e,如下所示:
[~]#echo "Hello world.\nHello sea"
Hello world.\nHello sea
[~]#echo -e "Hello world.\nHello sea"
Hello world.
Hello sea
[~]#
不加-e
看一下man的说明:
[~]#man echo | cat
ECHO(1) User Commands ECHO(1)
NAME
echo - display a line of text
SYNOPSIS
echo [OPTION]... [STRING]...
DESCRIPTION
Echo the STRING(s) to standard output.
-n do not output the trailing newline
-e enable interpretation of backslash escapes
-E disable interpretation of backslash escapes (default)
--help display this help and exit
--version
output version information and exit
If -e is in effect, the following sequences are recognized:
\0NNN the character whose ASCII code is NNN (octal)
\\ backslash
\a alert (BEL)
\b backspace
\c suppress trailing newline
\f form feed
\n new line
\r carriage return
\t horizontal tab
\v vertical tab
NOTE: your shell may have its own version of echo, which usually super-
sedes the version described here. Please refer to your shell’s docu-
mentation for details about the options it supports.
- echo换行
- ECHO不换行
- echo 不换行
- shell echo换行
- echo中如何换行
- echo的换行与不换行
- echo不换行的实现
- ant echo message 换行等
- echo如何手动输出换行
- Shell echo用法:shell echo不换行输出、换行输出|shell echo换行符、制表符
- [shell] shell echo打印换行的方法
- shell脚本echo的换行操作
- linux 中echo命令的换行方法
- shell echo打印换行的方法
- shell脚本echo的换行操作
- 多个 echo 输出 不换行
- SHELL echo 不换行输出(刷新输出)
- echo不换行输出实现进度条
- KB/S MBPS转换
- LoadRunner脚本 《第二篇》
- Swift学习笔记 -- 简单值
- poj 2063 Investment 贪心+完全背包
- 主键和唯一索引的区别
- echo换行
- 博客、把一些开发文章转发整理
- Android TextView两端对齐
- iOS-通知
- LoadRunner用户行为模拟器 《第三篇》
- L1 L2 LASSO问题-难得的好文
- android(40)(撕衣服,bitmap的使用)
- Git分支管理策略
- Android四大组件----BroadcastReceiver