Shell scripting

Hi All,

can any one please help me for below.

Need to remove prefix and suffix in filename.

Filename as 123_filename.xml.123456

need to remove prefix (123) and suffix (123456)

filename should be like filename.xml

please help me to provide program in shell script.

Welcome to the forum.

Please become accustomed to provide decent context info of your problem.
It is always helpful to carefully and detailedly phrase a request, and to support it with system info like OS and shell, related environment (variables, options), preferred tools, adequate (representative) sample input and desired output data and the logics connecting the two, and, if existent, system (error) messages verbatim, to avoid ambiguities and keep people from guessing.

Depending on what shell you are using, no script would be needed, but simple shell "parameter expansion" could do the job.

Provide context for the request.
And, show the work that you have done in attempting to solve the matter.

Please remember, this is not a coding service. This is a support site to help people with problems or when stuck.