如何进入命令行上的一个选项卡字符? [英] How to enter a tab char on command line?
问题描述
在一个交互式的bash终端我怎么输入制表符?例如,如果我想用SED与标签,以取代_我想用:
In an interactive bash terminal how do I enter a tab character? For example, if I wanted to use sed to replace "_" with tabs I'd like to use:
echo $string | sed 's/[_]/TAB/g'
在哪里TAB意味着tab键。在那里,当我打的Tab键我没有得到任何字符和一个铮铮的噪音听起来这在shell脚本没有交互。我也试过 \\ t
,但它唯一的地方T在字符串,而不是标签。
Where TAB means the tab key. This works in a shell script not interactively where when I hit the tab key I get no character and a clank noise sounds. I've also tried \t
but it only places t's in the string and not tabs.
请注意,这是Mac OSX上。
Note this is mac osx.
推荐答案
$ P $与pcede它<大骨节病>控制骨节病> + <大骨节病> V 骨节病>,后跟<大骨节病>标签骨节病>共进晚餐preSS通常的扩张行为。
Precede it with Control + V, followed by Tab to suppress the usual expansion behavior.
这篇关于如何进入命令行上的一个选项卡字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!