Unix Technical Forum

Getting color in bash

This is a discussion on Getting color in bash within the AIX Operating System forums, part of the Unix Operating Systems category; --> I've seen people logged onto Linux machines with bash and they have these cool color-coded directory listings. I recently ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 04:26 AM
Steve Bassler
 
Posts: n/a
Default Getting color in bash

I've seen people logged onto Linux machines with bash and they have these
cool color-coded directory listings. I recently installed bash on several
AIX 5.x machines. Is it possible to set things up so I can get color like
that? Or is that something specific to Linux?

I normally login via PuTTY from my workstation or by ssh'ing from other
servers. I use the xterm terminal definition in the PuTTY setup. I've
heard about xterm-color, but it doesn't seem to be available, either in
PuTTY or in my AIX termcap definitions.

Thanks,
Steve
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 04:26 AM
Simon Marchese
 
Posts: n/a
Default Re: Getting color in bash

Steve Bassler wrote:

> I've seen people logged onto Linux machines with bash and they have
> these cool color-coded directory listings. I recently installed bash
> on several AIX 5.x machines. Is it possible to set things up so I can
> get color like that? Or is that something specific to Linux?
>
> I normally login via PuTTY from my workstation or by ssh'ing from other
> servers. I use the xterm terminal definition in the PuTTY setup. I've
> heard about xterm-color, but it doesn't seem to be available, either in
> PuTTY or in my AIX termcap definitions.


xterm has colour on my AIX 5.2 if you install the GNU ls in fileutils
(coreutils?). "ls --color" does the trick and I guess the "cool" guys
have an "alias ls="ls --color". That works thru PuTTY also (I just tried).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2008, 04:26 AM
Steve Bassler
 
Posts: n/a
Default Re: Getting color in bash

On Sat, 9 Oct 2004 22:44:43 +0000 (UTC), Simon Marchese
<sjm_news@yahoo.co.uk> wrote:

> Steve Bassler wrote:
>
>> I've seen people logged onto Linux machines with bash and they have
>> these cool color-coded directory listings. I recently installed bash
>> on several AIX 5.x machines. Is it possible to set things up so I can
>> get color like that? Or is that something specific to Linux?
>> I normally login via PuTTY from my workstation or by ssh'ing from
>> other servers. I use the xterm terminal definition in the PuTTY
>> setup. I've heard about xterm-color, but it doesn't seem to be
>> available, either in PuTTY or in my AIX termcap definitions.

>
> xterm has colour on my AIX 5.2 if you install the GNU ls in fileutils
> (coreutils?). "ls --color" does the trick and I guess the "cool" guys
> have an "alias ls="ls --color". That works thru PuTTY also (I just
> tried).


So this is actually a feature of the GNU ls code, rather than Linux- or
bash-specific (although I'm sure it's the default in Linux)? And
presumably it would work with any other shell as well?

Thanks,
Steve
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-05-2008, 04:26 AM
Scott
 
Posts: n/a
Default Re: Getting color in bash

In article <opsfmozdqcpjr4ab@falcon>,
bassmstr.delete.this.to.reply@adelphia.net says...
> On Sat, 9 Oct 2004 22:44:43 +0000 (UTC), Simon Marchese
> <sjm_news@yahoo.co.uk> wrote:
>
> > Steve Bassler wrote:
> >
> >> I've seen people logged onto Linux machines with bash and they have
> >> these cool color-coded directory listings. I recently installed bash
> >> on several AIX 5.x machines. Is it possible to set things up so I can
> >> get color like that? Or is that something specific to Linux?
> >> I normally login via PuTTY from my workstation or by ssh'ing from
> >> other servers. I use the xterm terminal definition in the PuTTY
> >> setup. I've heard about xterm-color, but it doesn't seem to be
> >> available, either in PuTTY or in my AIX termcap definitions.

> >
> > xterm has colour on my AIX 5.2 if you install the GNU ls in fileutils
> > (coreutils?). "ls --color" does the trick and I guess the "cool" guys
> > have an "alias ls="ls --color". That works thru PuTTY also (I just
> > tried).

>
> So this is actually a feature of the GNU ls code, rather than Linux- or
> bash-specific (although I'm sure it's the default in Linux)? And
> presumably it would work with any other shell as well?
>
> Thanks,
> Steve
>


It isn't OS or shell related, but the terminal type and utils your
using. You could run the same color generating command in ksh and get
color if your terminal type supports it.

An example of a terminal that doesn't support it is a text only based
LFT Console that isn't running CDE (or X-windows in general). Your stuck
with that wonderful green color as it doesn't support anything else.

At least that's the official IBM stance I got a long while back about it
and I haven't had time to hack ***errr*** -scratch that- I mean look
into it further.

-Scott





Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:46 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com