[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: Bash Scripting Question



On Sat, 2005-04-09 at 21:12 +1000, Cameron Hutchison wrote:
> Once upon a time Ron Johnson said...
> > On Sat, 2005-04-09 at 10:58 +0200, Almut Behrens wrote:
> > > On Sat, Apr 09, 2005 at 01:23:19AM -0500, Alex Malinovich wrote:
> > > > > > On Apr 9, 2005 1:17 AM, Hal Vaughan <hal@thresholddigital.com> wrote:
> > > > > > > to show a way to print out the full path name for EACH file or
> > > > > > > directory in a recursive listing?
> > > > 
> > > > find . -printf "`pwd`/%P\n"
> > > 
> > > also, find will do exactly what you want, if you give it an _absolute_
> > > path to start with, e.g.
> > > 
> > > find /etc
> > > 
> > > to get a recursive full-path listing of all files under /etc.
> > > Or, more generally, instead of 'find .':
> > > 
> > > find $PWD
> > 
> > Grrrr.  No other OS would even think about using a command named
> > "find" to *list* files in a directory.
> 
> You've got to find them before you list them. List (-print) happens to
> be the default action when they've been found.

Your next paragraph contradicts this sentence.

> You can use the standard list command (ls) to list files in a directory.
> There just happens to be more than one way to do things. Some OSes dont
> give you many options - you've got to do things the way the OS designers
> think they should be done. That's something that makes me growl (grrrr).

And the GNU coreutils maintainers make you do things the way they
think things should be done.

Unless, as with every OS, you write your own utility.

-- 
-----------------------------------------------------------------
Ron Johnson, Jr.
Jefferson, LA USA
PGP Key ID 8834C06B I prefer encrypted mail.

"What is the primary purpose of a political leader? To build a
majority. If [voters] care about parking lots, then talk about
parking lots."
Speaker Newt Gingrich (R-GA)

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: