Article View: comp.bugs.sys5
Article #433Re: Improving "file" (was Re: Making Solaris 2.1 smarter...)
From: Guy Harris
Date: Sun, 10 Jan 1993 05:58
Date: Sun, 10 Jan 1993 05:58
33 lines
2117 bytes
2117 bytes
>I'm just learning to use perl and wonder if anyone else thinks that perl >would be a good implementation language for the extended file(1) that >Guy describes. Actually, at this point, most of it is already implemented in another language, namely C; Ian Darwin's "file", version 3.0, has much of what's needed, and I sent him a pile of changes that add in some missing stuff: I added "beshort" and company, although it still does C-style strings for "string"; I added "multi-level" continuations, so that you can say "if this matches, the file is an XXX; if so, then if *this* matches, it's a YYY type of XXX, and if *that's* true, then if, in turn, *this* matchines, the file is a ZZZ type of YYY type of XXX"; and, it turns out, that plus some other hacks that already exist provide some of the string extraction stuff that I wanted - *and*, returning to the posting that started this, allows it to decode the core files you get from a SunOS 4.x SPARC binary that blows up when run on a 5.x machine. No, I'm not going to distribute it, because one of the files in Ian's distribution asks people not to distribute modified versions - he ends up getting mail about it *anyway*, even though the modified versions say "It's Not Ian's Fault". However, don't let me dissuade you from writing one in "perl" (presumably, it would be its own configuration file, or would run its configuration file); it might be an interesting hack, although I'm not about to jump in and do it - try posting the suggestion to "comp.lang.perl" and see if somebody takes it as a challenge....
Technical Details
Message-ID:
<16320@auspex-gw.auspex.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!auspex-gw!guyReferences:
<1993Jan5.171945.29966@fwi.uva.nl> <16235@auspex-gw.auspex.com> <C0Hoqv.GtJ@vuse.vanderbilt.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!auspex-gw!guy From: guy@Auspex.COM (Guy Harris) Newsgroups: comp.bugs.sys5 Subject: Re: Improving "file" (was Re: Making Solaris 2.1 smarter...) Message-ID: <16320@auspex-gw.auspex.com> Date: 10 Jan 93 05:58:21 GMT References: <1993Jan5.171945.29966@fwi.uva.nl> <16235@auspex-gw.auspex.com> <C0Hoqv.GtJ@vuse.vanderbilt.edu> Sender: news@auspex-gw.auspex.com Distribution: na Organization: Auspex Systems, Santa Clara Lines: 33 Nntp-Posting-Host: auspex.auspex.com