Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Mar 2002 16:28:12 -0300 (ART)
From:      Fernando Gleiser <fgleiser@cactus.fi.uba.ar>
To:        Jay Austad <austad@marketwatch.com>
Cc:        <freebsd-questions@FreeBSD.ORG>
Subject:   RE: any bash guru's out there?
Message-ID:  <20020313161743.O55156-100000@cactus.fi.uba.ar>
In-Reply-To: <54180709DD3FE145917BB165AFE7EFA002E0D62F@mspexch2.office.mktw.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 13 Mar 2002, Jay Austad wrote:

> I just add:
> alias ls="ls -F --color"
>
> to my /etc/profile

This is not a very good idea. It breaks any script which takes the output
of ls to do things. even something as simple as:

for file in $(ls)
do
	cp $file ${file}.new
done

fails miserably because $file is not the name of the file, but the file name,
plus some ANSI escape sequences for color, plus some funny char at the end.

If you like the alias, make it one for yourself in ~/.profile, but don't add
it to a system wide configuration file unless you are willing to deal with
the other users' complaints about things which stopped working today and
"yesterday it worked just fine"


				Fer

>
> Jay
>
> > -----Original Message-----
> > From: Barry Byrne [mailto:barry.byrne@wbtsystems.com]
> > Sent: Wednesday, March 13, 2002 10:12 AM
> > To: Kirk R. Wythers; freebsd-questions@FreeBSD.ORG
> > Subject: RE: any bash guru's out there?
> >
> >
> > Kirk:
> >
> > No need to muck with the shell.
> >
> > Just use the -F option with ls.
> >
> > man ls for further details.
> >
> > Cheers,
> >
> > Barry
> >
> > --
> > Barry Byrne, IT Manager,
> > WBT Systems, Block 2, Harcourt Centre
> > Harcourt Street, Dublin 2, Ireland
> >
> >
> > > -----Original Message-----
> > > From: owner-freebsd-questions@FreeBSD.ORG
> > > [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of
> > Kirk R. Wythers
> > > Sent: 13 March 2002 15:57
> > > To: freebsd-questions@FreeBSD.ORG
> > > Subject: any bash guru's out there?
> > >
> > >
> > > I would like to add some functionality to bash. I'd like to
> > be able to
> > > distinguish at a glance, a file from a directory, from a
> > sym link in a
> > > console... I've seen this don with different colors in a
> > console or (in
> > > monochrome) with a / at the beginning of directory name,
> > and a @ at the
> > > beginning of a sym link.
> > >
> > > Can someone point me to a location that discusses this?
> > >
> > > --
> > > *NOTE NEW EMAIL ADDRESS*
> > >
> > > Kirk R. Wythers				email: kwythers@umn.edu
> > > University of Minnesota			tel: 612.625.2261
> > > Department of Forest Resources		fax: 612.625.5212
> > > Saint Paul, MN 55108
> > >
> > >
> > >
> > > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > > with "unsubscribe freebsd-questions" in the body of the message
> > >
> >
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-questions" in the body of the message
> >
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020313161743.O55156-100000>