www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/05/31/10:05:11

Date: Thu, 31 May 2001 17:04:46 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: David Witbrodt <dawitbro AT alpha DOT delta DOT edu>
cc: "Nimrod A. Abing" <n_abing AT ns DOT roxas-online DOT net DOT ph>,
DJGPP mailing list <djgpp AT delorie DOT com>
Subject: Re: FAQ saves the day
In-Reply-To: <3B1520FF.225C54BA@alpha.delta.edu>
Message-ID: <Pine.SUN.3.91.1010531170247.23879A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 30 May 2001, David Witbrodt wrote:

> > FWIW, you could have just downloaded and installed the fil???b.zip package
> > which contains the `ls', `df', and `du' commands. These commands will list
> > the contents of a directory, show (estimate?) remaining disk space, and
> > show how much space a file or directory uses. With the --color=auto
> > command-line option to `ls' you can get colored output on your colored
> > monitor. To get paging, there is the `less' pager that comes in its own
> > package.
> [...]
>   Besides, in real life reinventing the wheel is probably silly, but
> in programming (and other technical subjects) it is usually quite
> necessary, in my view.  I watch C++ students sweat blood every
> semester trying to learn how to use array indexing correctly, set up
> and manipulate linked lists without error, and simply get cout to
> format their output the way they want it.  Since I haven't installed
> fil316b, I don't know whether I can get ls, df, and du (or a script
> using them) to do exactly what I want, but I do know that this program
> I'm writing -- which is nearly finished and works pretty good so far
> -- _does_ do exactly what I want.  And I disagree:  it _is_ good
> practice.

Even if you do want to reinvent the wheel, you might benefit from looking 
into the sources of `ls' to see how does it go about colorizing the 
output.  You can then choose whether to use the same method or do 
something different.

After all, that's what's great about Free Software: the sources are there 
to be perused and studied.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019