本文介绍了什么是Bash的转义符" \\ C"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是名称和的功能\\ Bash中ç转义字符?什么是它的数值?我已经看到了 \\ CX 是一个控制字符,但对于普通的 \\ C ?似乎

What is the name and function of the \c escape character in Bash? What is its numeric value? I have seen that \cx is a control character, but what about plain \c? It seems that:

echo -e "Hello World\c"

echo -en "Hello World"

是等效的。然而,Python不使用它作为转义字符,它是所有我发现的转义字符名单的丢失。这是一个特定的Bash的行为?

are equivalent. However, Python doesn't use it as an escape character, and it is missing from all of the lists of escape characters I found. Is this a Bash-specific behavior?

推荐答案

这实际上是特定于某些版本的回声(我pretty确保 \\ C 从SysV的来到而 -n 版本是一个BSD-ISM)。

That's actually specific to some versions of echo (I'm pretty sure that \c came from SysV while the -n version was a BSD-ism).

这仅仅意味着不输出其后的换行符。

It simply means don't output the trailing newline.

这篇关于什么是Bash的转义符" \\ C"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 21:52