I'm able to download the file successfully using the following curl command.
curl -u ${UserName}:${Password} -k ${URL} -o ~/response.txt
Example of directory contents and filenames from response.txt is
<a href="2.0.0-SNAPSHOT/">2.0.0-SNAPSHOT/</a> 05-Mar-2020 11:13 -
<a href="5.0.0-SNAPSHOT/">5.0.0-SNAPSHOT/</a> 06-Feb-2020 13:14 -
<a href="2.0.2-SNAPSHOT/">2.0.2-SNAPSHOT/</a> 06-Mar-2020 15:51 -
<a href="2.0.1-SNAPSHOT/">2.0.1-SNAPSHOT/</a> 05-Mar-2020 17:39 -
So, I would like to automate the whole process to find out the latest folder name from it? I tried using
sort
using column
3,4
names but still not able to figure it out if this is the best solution as I don't know if, in long run whether column 3 and 4 will be right one to provide the latest folder?
can anyone suggest me how to get the latest
SNAPSHOT
from here best possible way?
PS: Now i tested with some other values sort is definitely not the right one.