2 added 140 characters in body
source | link

I extracted the version section by using below awk command. As tested its worked fine.

echoInputfile

<a "href="/url/version/tree/'" | awk1.0.1alpha11" class="css-Ftruncate">
<a "href="/" '{printurl/version2/tree1/1.0.2alpha11" $3}’class="css-truncate">

Output

<a href="/url/version/tree/2.0stable" class="css-truncate">

============================================command

echoawk "/url/version2/tree1-F '[/"]' |awk'{print $NF}' Inputfile| awk -F "/"'"' '{print $3$1}'

Outputoutput

version21.0.1alpha11
1.0.2alpha11
2.0stable

I extracted the version section by using below awk command. As tested its worked fine

echo "/url/version/tree/'" | awk -F "/" '{print $3}’

Output

version

============================================

echo "/url/version2/tree1/" |awk -F "/" '{print $3}

Output

version2

I extracted the version by using below awk command. As tested its worked fine.

Inputfile

<a href="/url/version/tree/1.0.1alpha11" class="css-truncate">
<a href="/url/version2/tree1/1.0.2alpha11" class="css-truncate">
<a href="/url/version/tree/2.0stable" class="css-truncate">

command

awk -F '[/]' '{print $NF}' Inputfile| awk -F '"' '{print $1}'

output

1.0.1alpha11
1.0.2alpha11
2.0stable
1
source | link

I extracted the version section by using below awk command. As tested its worked fine

echo "/url/version/tree/'" | awk -F "/" '{print $3}’

Output

version

============================================

echo "/url/version2/tree1/" |awk -F "/" '{print $3}’

Output

version2