manipulating home directory

Hi,

The homedirectory of a particular user is "/prod/idms_tp/home/prodtp" and I managed to extract the rootdir (/prod) but how do I extract the rest of it (/idms_tp/home/prodtp)

Many thanks

echo '/prod/idms_tp/home/prodtp'| sed 's/^\(\/\{1\}[^\/]*\)\/.*/\1/g'
/prod
echo '/prod/idms_tp/home/prodtp'| sed 's/^\/\{1\}[^\/]*\(\/.*\)/\1/g'
/idms_tp/home/prodtp

thanks a lot. It works beautifully