Chinaunix首页 | 论坛 | 博客
  • 博客访问: 317430
  • 博文数量: 122
  • 博客积分: 1395
  • 博客等级: 中尉
  • 技术积分: 1340
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-03 20:40
个人简介

智者,既能奋发不休,又能尽人事,顺天命

文章分类

全部博文(122)

文章存档

2014年(39)

2013年(46)

2012年(12)

2011年(3)

2010年(20)

2009年(2)

我的朋友

分类: LINUX

2010-03-10 09:44:58

在ABS中看到一个例子:

# echo "This will print \

as one line."

这个echo仅仅会输出一行,不是很理解,查了一下bash的manual,原来这是一个特殊用法:

3.1.2.1 Escape Character

A non-quoted backslash ‘\’ is the Bash escape character. It preserves the literal value of the next character that follows, with the exception of newline. If a \newline pair appears, and the backslash itself is not quoted, the \newline is treated as a line continuation (that is, it is removed from the input stream and effectively ignored).

在双引号中也提到了newline,从实际例子中来看,处理方法是一样的。

阅读(682) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~