If I execute the ls command with a smaller channel, I get strange output
ESC[00mESC[00mfile1.ccESC[00m ESC[00file2.ccESC[00m ESC[00file3.ccESC[00m
(there is an ESC line between the characters).
Without ls output:
file1.cc file2.cc file3.cc
How to fix it?
I assume that you have an option --color=alwaysfor ls, set either through an alias, either in a function, or in an environment variable LS_COLORS, and lssend the color directives to the nonterminal (that is, your pipe - less).
--color=always
ls
LS_COLORS
less
Use less -Ror set the environment variable LESSto -R.
less -R
LESS
-R
, , escape- ANSI . ls --color=no.
ls --color=no
less -r.
less -r
Source: https://habr.com/ru/post/1768756/More articles:Are Linux timezone files always in / usr / share / zoneinfo? - timezonePHP replaces variables in a Word document - variablesError forcing condition_variable - boostZend Paginator отображает неправильный счет страницы, когда запрос имеет "отличную" - phpWhy am I getting a segmentation error? - chow to reset multiple LINQPAD levels - .netWhen a module is imported into a Ruby class, is it similar to composition? - ruby | fooobar.comStarting a django project in a subdirectory of a site already running Drupal - djangois caliburn a viable Silverlight system for major development? - silverlightDeleted .js Google Maps and Access-Control-Allow-Origin - javascriptAll Articles