home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / bugs / sys5 / 168 < prev    next >
Encoding:
Internet Message Format  |  1993-01-10  |  2.0 KB

  1. Path: sparky!uunet!auspex-gw!guy
  2. From: guy@Auspex.COM (Guy Harris)
  3. Newsgroups: comp.bugs.sys5
  4. Subject: Re: Improving "file" (was Re: Making Solaris 2.1 smarter...)
  5. Message-ID: <16320@auspex-gw.auspex.com>
  6. Date: 10 Jan 93 05:58:21 GMT
  7. References: <1993Jan5.171945.29966@fwi.uva.nl> <16235@auspex-gw.auspex.com> <C0Hoqv.GtJ@vuse.vanderbilt.edu>
  8. Sender: news@auspex-gw.auspex.com
  9. Distribution: na
  10. Organization: Auspex Systems, Santa Clara
  11. Lines: 33
  12. Nntp-Posting-Host: auspex.auspex.com
  13.  
  14. >I'm just learning to use perl and wonder if anyone else thinks that perl
  15. >would be a good implementation language for the extended file(1) that
  16. >Guy describes.
  17.  
  18. Actually, at this point, most of it is already implemented in another
  19. language, namely C; Ian Darwin's "file", version 3.0, has much of what's
  20. needed, and I sent him a pile of changes that add in some missing stuff:
  21.  
  22.     I added "beshort" and company, although it still does C-style
  23.     strings for "string";
  24.     
  25.  
  26.     I added "multi-level" continuations, so that you can say "if
  27.     this matches, the file is an XXX; if so, then if *this* matches,
  28.     it's a YYY type of XXX, and if *that's* true, then if, in turn,
  29.     *this* matchines, the file is a ZZZ type of YYY type of XXX";
  30.  
  31.     and, it turns out, that plus some other hacks that already exist
  32.     provide some of the string extraction stuff that I wanted -
  33.     *and*, returning to the posting that started this, allows it to
  34.     decode the core files you get from a SunOS 4.x SPARC binary
  35.     that blows up when run on a 5.x machine.
  36.  
  37. No, I'm not going to distribute it, because one of the files in Ian's
  38. distribution asks people not to distribute modified versions - he ends
  39. up getting mail about it *anyway*, even though the modified versions say
  40. "It's Not Ian's Fault".
  41.  
  42. However, don't let me dissuade you from writing one in "perl"
  43. (presumably, it would be its own configuration file, or would run its
  44. configuration file); it might be an interesting hack, although I'm not
  45. about to jump in and do it - try posting the suggestion to
  46. "comp.lang.perl" and see if somebody takes it as a challenge....
  47.