[Slackbuilds-users] Possible typo in python3.SlackBuild
Christoph Willing
chris.willing at iinet.net.au
Fri Jan 9 07:09:55 UTC 2015
On 01/09/2015 04:35 PM, Niki Kovacs wrote:
> Hi,
>
> I just noticed a strange line in python3.SlackBuild:
>
> PYVER=${VERSION::3}
>
> I only know this kind of notation:
>
> PYVER=${VERSION:-3}
>
> Is this an error or some special syntax I don't know?
From the Parameter Expansion section of the bash manpage:
${parameter:offset:length}
Substring Expansion. Expands to up to length characters of the
value of parameter starting at the character specified by off-set.
Its not stated there but I presume a blank offset defaults it to 0,
therefore for a VERSION of 3.4.2, PYVER would be set to 3.4
chris
More information about the SlackBuilds-users
mailing list