trim file name extension????

Dear Chaps,

What will I do if, I am not sure about the length of the file name, but only one thing that I want to remove only the last extension.
e.g. abcdXXXXXX.pqrXXXXX.asc (X is any character)
I want to trim only .asc (or,watever) so that resultant file name would be like abcdXXXXXX.pqrXXXXX
Any idea?

Cheers,
Vishal

Duplicate post,

http://www.unix.com/unix-for-dummies-question-and-answers/40195-how-can-i-truncate-filenmes.html#post302129510

Moderators please :slight_smile: