I have a list of files, with each file contained on its own line. Each filename has a variable length of n but the last 7 characters of each file are specific identifiers. I want to figure out how to remove all characters before last 7 characters of each line. I figured this is possible using the sed command and did research on google and the sed man page. However, I've only found resources that show how to format sed to remove the last n characters in each line, which is done as so:
sed 's/.\{n\}$//'
I'm fairly new to bash and can't find effective resources to find out how to format the sed command. Does anyone know how to alter this command to print only last 7 characters of each line.