Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 421
  • Last Modified:

Bash: the tab key and auto-completion

I'm trying to figure out how to type an actual tab character on the Bash command line.

Bash used TAB as they key for an auto-completion function.  

When I'm trying to write sed scripts on the command-line, I cannot get a tab character typed into the script.

I'd be willing to learn how to turn off auto-completion, but it would be better to still have auto-completion and also be able to type the tab character.

thanks.
0
jcoman777
Asked:
jcoman777
1 Solution
 
leflonCommented:
Hi jcoman777,

if you need to include a TAB char in your sed statement you should use the \t escape sequence in the place of the TAB.

hth
leflon
0
 
dtkernsCommented:
preceed your tab with a ctrl-V
0
 
jcoman777Author Commented:
I don't know what version of sed I have, but \t does not work.  I found a couple sources online that warned that \t would not work.

ctrl-v then TAB does work!  thanks!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now