psyonly

Linux echo命令

Create@2023/06/13 10:17:39 | Update@2023/06/13 11:40:31Tags: linux, echo

linux中 echo命令的特殊用法


echo命令的用法

echo 命令常用于输出指定内容,在一些特殊的情况下,往往需要对输出的内容做特殊的处理

输出转义

echo 使用-e参数可在输出字符串内容时转义特殊字符,例如'\n'。

一个例子

> echo "aaa\nxxx"
> aaa\nxxx

> echo -e "aaa\nxxx"
> aaa
> xxx
>