how to capture the jdk1.8.0_112
under /usr/jdk64
/usr/jdk64/jdk1.8.0_112/
while jdk1.8.0_112 is example
and could be any other version as
jdk1.7.0_112
jdk3.8.2_112
jdk1.8.0_117
jdk1.2.0_112
jdk2.7.66_112
jdk1.8.2_111
jdk1.23.0_117
jdk9.2.093_112
/usr/jdk64
? What is wrong with expanding the shell glob/usr/jdk64/jdk*
? What are you expecting as the result (a string in a variable?)bash
?