I would like to write a shell script in which I'll take a line input from user,which will contain some xxx.cpp as filename. I want to get that "xxx" in another variable. e.g.
if user give input as:
some params path/to/file/xyz.cpp more p/ara/ms
I want to get xyz which occurs before".cpp" and after last occurance of "/" before ".cpp"