home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!ukma!wupost!cs.utexas.edu!convex!convex!tchrist
- From: Tom Christiansen <tchrist@convex.COM>
- Subject: Re: Octal chmod status
- Originator: tchrist@pixel.convex.com
- Sender: usenet@news.eng.convex.com (news access account)
- Message-ID: <1992Aug19.143059.17010@news.eng.convex.com>
- Date: Wed, 19 Aug 1992 14:30:59 GMT
- Reply-To: tchrist@convex.COM (Tom Christiansen)
- References: <Bt7t36.1w3@mudos.ann-arbor.mi.us> <1992Aug19.130558.8488@news.eng.convex.com> <1r!n6yd.messina@netcom.com>
- Nntp-Posting-Host: pixel.convex.com
- Organization: Convex Computer Corporation, Colorado Springs, CO
- X-Disclaimer: This message was written by a user at CONVEX Computer
- Corp. The opinions expressed are those of the user and
- not necessarily those of CONVEX.
- Lines: 40
-
- From the keyboard of messina@netcom.com (Tony Porczyk):
- :Tom Christiansen <tchrist@convex.COM> responds to Marc Unangst:
- :
- :>Big deal. That infinitesimal time difference is surely not
- :>worth all the hassle of writing a C program for each and every little
- :
- :Even though I agree that the perl solution was fine (by being so
- :small), but I do not understand the bruhaha about the "hassle" of
- :writing a C program for small tasks. It is often much simpler and
- :*faster* to write the C code than to implement other solutions. At
- :least it is much more *readable* than the aformentioned perl script...
-
- Fine, if you want me to optimize for legibility, I'll do that.
-
- require 'stat.pl';
- @sb = stat($ARGV[0]);
- printf("%04o\n", $sb[$ST_MODE]);
-
- The bruhaha stems from having to install a hundred binaries on a hundred
- systems spanning a dozen different architectures. Programs that aren't
- self-contained are a major hassle.
-
- For this reason, I'd much rather see an embedded here-is document used
- than an auxiliary data file, and I'd much rather see a solution calling
- sed, awk, or perl than one requiring dedicated C programs.
-
- In many cases (of which this is a prime example) by the time you've
- written your C program, I'll be long done with the perl version, and will
- have probably finished a couple other programs as well.
-
- Putting your interpreted programs in a commonly-mounted directory is a
- major win in convenience as well as in disk space.
-
- --tom
-
- --
- Tom Christiansen tchrist@convex.com convex!tchrist
- "I sincerely hope that the future does not mean we must continually restrict
- ourselves to the tools that were available 10 years ago."
- Mark Bush in comp.unix.wizards <4235@inca.comlab.ox.ac.uk>
-