[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: English sentences, was: Re: Announce:XML Schema,


unix file command java
On Fri, 2002-06-28 at 00:17, Thomas B. Passin wrote:
> [Eric van der Vlist
> >
> > If you are happy with the result of the unix "file" command to determine
> > the type of a text and see if it's more likely a Java source code, a
> > snippet of Python or an English text, you may want to validate the
> > document using its result instead of the code.
> >
>  You mean, try to compile and if it compiles, it's in that language?  But
> you can't be sure abouta file iwth a bug that prevents compiling.  How to
> handle that?

No, I meant using the unix "file" command which try to guess the "type"
of a file using "magic numbers":

vdv@ibook:~/wikiml/code/experimental/java$ file README             
README: ASCII English text
vdv@ibook:~/wikiml/code/experimental/java$ file WikiSAXWriter.java 
WikiSAXWriter.java: ASCII Java program text

but also:

vdv@ibook:~/4xt/pub/downloads/JrdfDB$ file Test.java 
Test.java: ASCII C program text, with very long lines

Like with any magic, it's not 100% sure and can sometimes be confused
like here between Java and C but it's usually working fine!


Eric
-- 
See you in San Diego.
                               http://conferences.oreillynet.com/os2002/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.