New answers tagged


Use -R flag: -r or --raw-control-chars Causes "raw" control characters to be displayed. The default is to display control characters using the caret notation; for example, a control-A (octal 001) is displayed as "^A". Warning: when the -r option is used, less cannot keep track of the actual appearance of the screen (since this depends on ...


You need to url-encode the data, and the easiest way to do this is to get curl to do it for by replacing the -d option by --data-urlencode. Also, you need to use double quotes or the shell will not expand the variable, so we have curl \ -H "Accept: application/json" \ -X POST \ --data-urlencode "${payload}" \ ...


Try pressing Control+[ immediately followed by h. Terminals do not send key presses directly to the shell (as in Control was pressed/released). Instead the terminal sends character sequences depending on keys pressed. The keys in a sequence are to be pressed - well - in sequence, not all at once. The big exception to this are the Control-keys and the ...


^[ actually means Escape character. Check here: In your case it seems your ALT key works as a synonym for Escape key:


please use %40 in place of @ in your password, for Example: your password is " A@ple123 " then use " A%40ple123"


Just a quick hack: when grep is sending output to a pipe, it also commutes to no-changing-color mode x | grep hello | cat


You could do this, x | grep --color=never hello To quickly test it, you can do, ls -l /etc/ --color=always | grep --color=never .


tput can handle expressions (for instance in sgr and setaf) which the typical shell-scripter would find less than usable. To get an idea of what is involved, see the output from infocmp with the -f (formatting) option applied. Here is one of examples using those strings from xterm's terminfo descriptions: xterm-16color|xterm with 16 colors, ...


Coming from a time when UNIX platforms could have a variety of devices attached to them, I still much prefer tput and its friends over literal escape sequences. I think the real reason is that most people simply don't know about tput and its associated terminfo/termcap files and libraries.


One of the reason, which I see, is that tput is the external command, so may run slower than built-in shell escape codes. Another thing is that one can easily create one liners combining ANSI escape codes with shell specific escaped characters, such as in bash prompt for example: PS1='\[\033[1;32m\]\u@\h\[\033[1;34m\] \w >\[\033[0m\] ' similarly in ...

Top 50 recent answers are included