[Freeciv-Dev] Re: Problems detecting automake version.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, 19 Aug 2003, Per I. Mathisen wrote:
> On Tue, 19 Aug 2003, Marko Lindqvist wrote:
> > >-pkg_version=`$PACKAGE --version|head -n 1|sed 's/^[a-zA-Z\.\ ()]*//;s/
> > >.*$//'`
> > >+pkg_version=`$PACKAGE --version|head -n 1|sed 's/(.*)//;s/^[a-zA-Z\.\
> > >]*//;s/ .*$//'`
...
> Ah. But you can accidentially delete too much, since sed is so greedy. For
> example the version string "test version (linux) 1.15.0 (beta-1)" will be
> correctly parsed by the current sed magic, while your new one will fail.
Paul (on irc) suggested sed 's/([^)]*)//g'. It seems to work.
- Per
"The truth is there is an ideological struggle between those who believe
that the best way to grow the economy is to give more money to the
wealthy, and the Democrats who believe that the wealthy will make more
money if average people do better." -- Bill Clinton, November 2000
|
|