I think we can use printf instead of print to get to strip the new lines
and select by "version".
head -50 pom.xml | awk -F'>' '/version/ {printf $2}' | awk -F'<' '{print
$1}'
Regards,
Chamila de Alwis
Committer and PMC Member - Apache Stratos
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com
On Thu, Oct 15, 2015 at 7:14 PM, Imesh Gunaratne <[email protected]> wrote:
> The below command works on both Ubuntu and OSX:
> head -50 pom.xml | awk -F'>' '/SNAPSHOT/ {print $2}' | awk -F'<' '{print
> $1}'
>
> Thanks
>
> On Thu, Oct 15, 2015 at 6:59 PM, Imesh Gunaratne <[email protected]> wrote:
>
>> Hi Devs,
>>
>> The following command used in docker/build.sh [1] does not work in OSX:
>> VERSION=`grep -oP '<version>\K[^<]+' pom.xml| head -1`
>>
>> Shall we just use version text for the moment?
>>
>> [1]
>> https://github.com/wso2/private-paas-cartridges/blob/master/wso2as/5.2.1/docker/build.sh
>>
>> Thanks
>>
>> --
>> *Imesh Gunaratne*
>> Senior Technical Lead
>> WSO2 Inc: http://wso2.com
>> T: +94 11 214 5345 M: +94 77 374 2057
>> W: http://imesh.gunaratne.org
>> Lean . Enterprise . Middleware
>>
>>
>
>
> --
> *Imesh Gunaratne*
> Senior Technical Lead
> WSO2 Inc: http://wso2.com
> T: +94 11 214 5345 M: +94 77 374 2057
> W: http://imesh.gunaratne.org
> Lean . Enterprise . Middleware
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev