如何进入命令行上的一个选项卡字符? [英] How to enter a tab char on command line?

查看:113
本文介绍了如何进入命令行上的一个选项卡字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个交互式的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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆