Tag Info

New answers tagged

0

Termbin.com supports what you need. $ grep --color=force foo /etc/motd | nc termbin.com 9999 http://termbin.com/xxxx $ curl http://termbin.com/xxxx You'll get exactly what you sent.


0

Try: $ printf 'a\!c\n' a!c or: $ printf '%s\n' a\!c


0

tcsh uses the ! character for history substitution g4ur4v:~> echo $0 tcsh g4ur4v:~> printf '!\n' ! EDIT g4ur4v:~> echo 'a\!c' a!c g4ur4v:~> printf 'a\!c\n' a!c


1

$'\n' is basically the same as typing Enter. So in your Perl example, it turns into* if(/ab cd/) Which isn't what you wanted. Reasons I can think of to use $'...': You want to put a single quote inside a single-quote delimited string, e.g. logger $'Can\'t open file' To make non-printable characters clearer, e.g. $'a\tb' rather than 'a<TAB ...


1

You use $'...' when you want escape sequences to be interpreted by the shell. $ echo 'a\nb' a\nb $ echo $'a\nb' a b In perl, -e option get a string. If you use $'...', the escape sequences in string are interpreted before passing to perl. In your case, \r had gone and never passed to perl. With $'...': $ perl -MO=Deparse -w -e $'binmode STDIN;undef ...


1

I just stumbled upon this pastebin that appears to support ANSI colors with Unicode chars! Seems that it was specifically designed for old school BBS Unicode ANSI color artwork... check it out: http://paste.sixteencolors.net/6


0

I got this working by adjusting the escape codes to watch for in my .vimrc. I still wish I had a better understanding of how all this works, and why the sequence sent by tmux differs from what's sent outside of tmux, but this got everything working: if &term =~ "screen" set <F13>=[1;2P set <F14>=[1;2Q set <F15>=[1;2R set ...


1

You may find this helpful: http://blog.jimueller.com/post/29709142253/use-putty-with-console2 If you call plink as an argument of ansicon.exe, this translates the escape sequences automatically. When I connect to my linux box, the output of ls is coloured automatically.


1

As said by the xterm(1) man page concerning this menu item (see Section VT Fonts), "This allows you to set the font last specified by the Set Font escape sequence (see the document Xterm Control Sequences)". So, until you use such an escape sequence, this menu item is grayed out. Actually it remains grayed out, but this may be a bug. To try: xterm -xrm ...


2

To answer the question of how to reset it: The xterm escape code OSC 50 ... BEL can be used to set the font (See the answer of @celtschk). Besides setting it to a font name, it can also be set to an index in the font menu you get with Ctrl and right mouse button. We can use this to reset to the default font by using the menu index 0: echo -n "\e]50;#0\a ...


3

Looking at the list of xterm escape codes reveals that (esc)]50;name(bel) sets the xterm's font to the font name, or to an entry in the font menu if the first character of name is a #. The simplest way to reset it is to use the xterm's font menu (Ctrl + right mouse click) and select an entry other than Default. Alternatively, you can find out which font the ...


1

If I understand you correctly, you have a regex pattern in a variable and you would like grep to use it without giving any special meaning to regex metacharacters. If this is the case, the -F (fixed strings) option to grep is what you want: grep -F "$var" your_file Your system may also have a special command (fgrep) that is equivalent to the above: fgrep ...



Top 50 recent answers are included