Article 5SRMQ Get a number and make in to a variable

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.

Thankslatest?d=yIl2AUoC8zA latest?i=L9mZvbnhOi4:1UkUjwrzZnc:F7zBnMy latest?i=L9mZvbnhOi4:1UkUjwrzZnc:V_sGLiP latest?d=qj6IDK7rITs latest?i=L9mZvbnhOi4:1UkUjwrzZnc:gIN9vFw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments