LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 796|回复: 1

-n,-e参数的作用

[复制链接]
发表于 2006-11-7 15:26:58 | 显示全部楼层 |阅读模式
各位大哥,小弟对shell下的-n作用不清楚,还有-e参数的功能,
比如说为什么echo '\n\n\n'输出来的直接是\n\n\n,而echo -e '\n\n\n'直接输出的是3行空格,
有哪位大哥能不能详细的给说说其作用,谢谢!
发表于 2006-11-8 15:40:18 | 显示全部楼层
man echo


NAME
echo - display a line of text   
SYNOPSIS
echo [OPTION]... [STRING]...   
DESCRIPTION
NOTE: your shell may have its own version of echo which will supercede the version described here. Please refer to your shell's documentation for details about the options it supports.
Echo the STRING(s) to standard output.

-n
do not output the trailing newline
-e
enable interpretation of the backslash-escaped characters listed below
-E
disable interpretation of those sequences in STRINGs
--help
display this help and exit
--version
output version information and exit
Without -E, the following sequences are recognized and interpolated:

\NNN
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
  
SEE ALSO
The full documentation for echo is maintained as a Texinfo manual. If the info and echo programs are properly installed at your site, the command
info echo
should give you access to the complete manual.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表