UNIX Shell: Simple expr command help!

TangDN

Member
Mar 16, 2002
31
0
0
Does anyone know how to use expr to extract part of a string ? For example, I have string that contains "/good/morning/world".
How could I use expr to extract just /morning ? Thanks!

:: EDIT :: What's wrong with this statment???

expr "$aname" : '.$fname(.$fname)' ???

i want to search string aname, for the occurance of fname. I want to extract all that is not fname from string aname . ????