1

I'm working with Ubuntu 16.04.4 LTS. I used Mobaxterm to login remotely.

When I execute grep, something weird happened...

me@mymachine:/data/myserver/log/server$ grep -rnH 23423 ./*log
... # outputs of the grep command
me@mymachine:/data/myserver/log/server$ xterm-256colorxterm-256colorxterm-256colorxterm-256color

I can't understand why I got the last line.

It seems that someone typed automatically xterm-256colorxterm-256colorxterm-256colorxterm-256color after executing the command grep -rnH 23423 ./*log.

I have to delete it or type Ctrl-c every time. It's really boring.

Yves
  • 3,161
  • 7
  • 26
  • 54

1 Answers1

1

You have a Ctrl + E (hex 0x05) somewhere in the results of your grep, and Mobaxterm is configured to respond to an "enquiry" request with the terminal type it's emulating.

The enquiry request is triggered with the control code. These days you should change the settings of your terminal emulator so that it ignores this request. There's little reason to need it, and with options that allow the answerback sequence to be changed programmatically it can open a security hole.

roaima
  • 107,089
  • 14
  • 139
  • 261