Get a number and make in to a variable
by glennbtn from LinuxQuestions.org on (#5SRMQ)
Hi All
Due to changes letsencrypt have made I am manually having to run a renewal as I can't update the software on the server. I am trying to write a script to do this but the file I need to cat to changes every renewal the line I run ls on looks like
cert.pem -> ../../archive/server161.mydomain.co.uk/cert23.pem
Can anyone tell me how I can list the number at the end of cert to make in to a variable as each way I seem to try I get both the server number and the cert number as not to good at getting out the information.
Thanks
Due to changes letsencrypt have made I am manually having to run a renewal as I can't update the software on the server. I am trying to write a script to do this but the file I need to cat to changes every renewal the line I run ls on looks like
cert.pem -> ../../archive/server161.mydomain.co.uk/cert23.pem
Can anyone tell me how I can list the number at the end of cert to make in to a variable as each way I seem to try I get both the server number and the cert number as not to good at getting out the information.
Thanks