Re: Print version and quit

Dimitry Golubovsky <[email protected]>
Newsgroups gmane.comp.lang.haskell.hugs.user
Message-ID <[email protected]>
Leif Frenzel wrote:
> Hi,
> 
> is there an option for Hugs to just show a version string and quit
> immediately? (Could not find anything like that in the manual, and some
> plausible candidates I tried had not the desired effect.)
> 


Have you tried something like this (quick and dirty; some more 
sofisticated Perl solution might be suggested but I am not a Perl expert):


echo :Q|hugs|grep Version|tr -d "|_"

Release will print (e. g.):

    Version: November 2002

A CVS snapshot based executable will print (e. g.):

    Version: 20040720

To be more precise, some leading and trailing blanks may remain. But I'm 
sure you can figure it out how to remove them (and the word Version: as 
well if needed).

-- 
Dmitry M. Golubovsky
       South Lyon, MI
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.