I am getting different set of values in a variable. These values can be adminWash4567.sh adminWash4567.txt eastLA7456.sh eastLA7456.txt westLA7825 oldSFB8523 etc. I basically am trying to extract the last 4 digits of the value which starts with "admin".
I think it should work something like this
if the value starts with "admin" save last 4 digits in a variable before the "." (as in adminWash4567.sh) and exit
it would be great if you can suggest a way to do this