RE: ls -l | less shows escape chars

2004-07-01 Thread Clemson, Chris
 When I do ls -l | less a typical line looks like this with ESC in 
 reverse video and other weird chars. What causes this? Can it 
 be fixed?
 
 -rwx--+   1 Administ   1392640 Jul  1 08:31 
 ESC[01;32mNTUSER.DATESC[0m

that looks suspiciously like ANSI (colour) escape codes.
is your terminal setting correct?

-- 
The content of this e-mail is confidential, may contain privileged material
and is intended solely for the recipient(s) named above. If you receive this
in error, please notify Software AG immediately and delete this e-mail.

Software AG (UK) Limited
Registered in England  Wales 1310740
Registered Office: Hudson House, Hudson Way,
Pride Park, Derby DE24 8HS

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: ls -l | less shows escape chars

2004-07-01 Thread Joe
Do you have ls aliased to ls --color?

Try:  /bin/ls | less

geneSmith [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 When I do ls -l | less a typical line looks like this with ESC in
 reverse video and other weird chars. What causes this? Can it be fixed?

 -rwx--+   1 Administ   1392640 Jul  1 08:31
 ESC[01;32mNTUSER.DATESC[0m

 -- 
 Lit up like Levy's






--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: ls -l | less shows escape chars

2004-07-01 Thread geneSmith
Clemson, Chris wrote, On 7/1/2004 8:50 AM:
When I do ls -l | less a typical line looks like this with ESC in 
reverse video and other weird chars. What causes this? Can it 
be fixed?

-rwx--+   1 Administ   1392640 Jul  1 08:31 
ESC[01;32mNTUSER.DATESC[0m

that looks suspiciously like ANSI (colour) escape codes.
is your terminal setting correct?
$ echo $TERM
xterm
$ env | grep -i term
COLORTERM=rxvt-xpm
TERM=xterm
$ env | grep -i less
LESSCHARSET=latin1
What are the correct setting and how do you set them?
Also, my less man page is totally messed up. All other man pages seem to 
work.

Thanks,
-gene
--
Lit up like Levy's
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: ls -l | less shows escape chars

2004-07-01 Thread geneSmith
Joe wrote, On 7/1/2004 9:02 AM:
Do you have ls aliased to ls --color?
Try:  /bin/ls | less
That fixes it. Should I not use color?
geneSmith [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
When I do ls -l | less a typical line looks like this with ESC in
reverse video and other weird chars. What causes this? Can it be fixed?
-rwx--+   1 Administ   1392640 Jul  1 08:31
ESC[01;32mNTUSER.DATESC[0m
--
Lit up like Levy's

--
Lit up like Levy's
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


RE: ls -l | less shows escape chars

2004-07-01 Thread Clemson, Chris
  that looks suspiciously like ANSI (colour) escape codes.
  is your terminal setting correct?
  
 $ echo $TERM
 xterm

hmm, try setting TERM to vt100 or something, as that's quite a simple
terminal type and doesn't do anything fancy other than bold and underline.
of course, if your terminfo/termcap stuff knows about cygwin, you could set
TERM=cygwin instead.

chris

-- 
The content of this e-mail is confidential, may contain privileged material
and is intended solely for the recipient(s) named above. If you receive this
in error, please notify Software AG immediately and delete this e-mail.

Software AG (UK) Limited
Registered in England  Wales 1310740
Registered Office: Hudson House, Hudson Way,
Pride Park, Derby DE24 8HS

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: ls -l | less shows escape chars

2004-07-01 Thread Luc Hermitte
Hello,

* On Thu, Jul 01, 2004 at 09:06:16AM -0400, geneSmith [EMAIL PROTECTED] wrote:
 Also, my less man page is totally messed up. All other man pages seem
 to work.

I have 
export PAGER='less -R'
in my .bashrc

HTH,
-- 
Luc Hermitte

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: ls -l | less shows escape chars

2004-07-01 Thread Buchbinder, Barry (NIH/NIAID)
or switch the alias to ls --color=auto, which will color for a simple ls
but not when redirecting stdout.

-Original Message-
From: Joe
Sent: Thursday, July 01, 2004 9:03 AM
To: [EMAIL PROTECTED]
Subject: Re: ls -l | less shows escape chars

Do you have ls aliased to ls --color?

Try:  /bin/ls | less

geneSmith [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 When I do ls -l | less a typical line looks like this with ESC in
 reverse video and other weird chars. What causes this? Can it be fixed?

 -rwx--+   1 Administ   1392640 Jul  1 08:31
 ESC[01;32mNTUSER.DATESC[0m

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: ls -l | less shows escape chars

2004-07-01 Thread geneSmith
Luc Hermitte wrote, On 7/1/2004 9:14 AM:
Hello,
* On Thu, Jul 01, 2004 at 09:06:16AM -0400, geneSmith [EMAIL PROTECTED] wrote:
Also, my less man page is totally messed up. All other man pages seem
to work.

I have 
export PAGER='less -R'
in my .bashrc

HTH,
man less started working again. I don't know why.
Anyhow, when I do
ls -l | less -R
it works fine and I see correct colors and no ESC chars.
Without the -R it is it is messed up.
--
Lit up like Levy's
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: ls -l | less shows escape chars

2004-07-01 Thread geneSmith
Clemson, Chris wrote, On 7/1/2004 9:13 AM:
that looks suspiciously like ANSI (colour) escape codes.
is your terminal setting correct?
$ echo $TERM
xterm

hmm, try setting TERM to vt100 or something, as that's quite a simple
terminal type and doesn't do anything fancy other than bold and underline.
of course, if your terminfo/termcap stuff knows about cygwin, you could set
TERM=cygwin instead.
chrisb
export TERM=vt100
had no effect.
Where is the terminfo/termcap stuff?
Could it be significant that I installed and am using rxvt shell? 
However, when I use the default cygwin terminal I see the same thing.

--
Lit up like Levy's
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: ls -l | less shows escape chars

2004-07-01 Thread geneSmith
Luc Hermitte wrote, On 7/1/2004 9:14 AM:
Hello,
* On Thu, Jul 01, 2004 at 09:06:16AM -0400, geneSmith
[EMAIL PROTECTED] wrote:
Also, my less man page is totally messed up. All other man pages
seem to work.

I have export PAGER='less -R' in my .bashrc
HTH,
Oops, I misspoke. It is my rxvt man page that is messed up. I see stuff 
like this when I do
man rxvt
I see stuff like this:

.YODLTAGSTART.  roffcmd  .SH  NAME  .YODLTAGEND.  rxvt (ouR
XVT) - a VT102 emulator for  the  X  window  system.YODLTAGSTART.
roffcmd .PP .YODLTAGEND.
Setting PAGER does not seem to affect anything for me.
Anyhow,when I do
alias less=less -R
My ls -l | less problem is solved.
Thanks,
-gene
--
Lit up like Levy's
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: ls -l | less shows escape chars

2004-07-01 Thread geneSmith
Joe wrote, On 7/1/2004 11:09 AM:
Either don't use color or change it to --color=auto.
I alias ls to ls -x -color=auto.
Then ls | less gives you columns without escape codes.
If you want a single column, use ls -1 | less.  The -1 overrides the -x in
the alias and gives one column.  Or leave out the -x if you never want
columns when piping to less.
Thanks for the info. However when I put
alias less=less -R
in my ~/.bash_profile it seem to work and and still get colors when I do 
ls -l | less.

-gene
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: ls -l | less shows escape chars

2004-07-01 Thread Joe
The only downside is if you need the output to go to a file or a pipe to a
different program.

If you still have ls aliased to ls --color, then this:

ls  /tmp/filelist

will still put escape codes in filelist.  ls --color=auto won't - it will
keep it plain ascii text.

If you never do that, then it's not an issue though.

geneSmith [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Joe wrote, On 7/1/2004 11:09 AM:

  Either don't use color or change it to --color=auto.
 
  I alias ls to ls -x -color=auto.
 
  Then ls | less gives you columns without escape codes.
 
  If you want a single column, use ls -1 | less.  The -1 overrides
the -x in
  the alias and gives one column.  Or leave out the -x if you never want
  columns when piping to less.

 Thanks for the info. However when I put
 alias less=less -R
 in my ~/.bash_profile it seem to work and and still get colors when I do
 ls -l | less.

 -gene






--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: ls -l | less shows 'escape' chars

2004-07-01 Thread Chris Taylor

On Thu, July 1, 2004 6:08 pm, Hannu E K Nevalainen said:
 

 For man rxvt:
 
 
 Use google on YODLTAGSTART and you'll eventually find a sed script and
 how to use it. It was posted very recently to this list.
 
 /Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E
 --76--
 
 
 ** on a mailing list; please keep replies on that particular list **
 
 

Specifically, the message you want is
http://www.cygwin.com/ml/cygwin/2004-06/msg00731.html

Chris

-- 
Your mode of life will be changed to EBCDIC.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/