[Slackbuilds-users] Possible typo in python3.SlackBuild

Audrius Kažukauskas audrius at neutrino.lt
Thu Jan 15 20:32:56 UTC 2015


On Sun, 2015-01-11 at 11:37:56 +1000, Christoph Willing wrote:
> If we're looking for something more robust, yet generic, then my previously
> proposed solution:
>     PYVER=${VERSION%.*}
> is not so great if a version string has extra fields i.e. VERSION=3.4.2.5
> would become 3.4.2 (rather than the desired 3.4).
> 
> To make up for that shortcoming, I offer:
>     PYVER=$(sed 's/\.[^\.]*//2g' <<< "$VERSION")
> 
> Maybe not as easy to read as Audrius' solution using cut though ...

I decided to use my solution.  Thanks for suggestions guys, and making
me aware of the issue in the first place.

-- 
Audrius Kažukauskas
http://neutrino.lt/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20150115/9d59a21d/attachment.asc>


More information about the SlackBuilds-users mailing list