getting part of directory after a certain /

i have a directory like this:

i want to get the subpaths:
/home/user/public_html/a/b
subpath= a/b

/home/user/public_html/a/b/c
subpath= a/b/c

i can get the user like

echo $fulldirectory |awk -F/ '{print $3}'

but im not sure how to get the rest of it after public_html

any ideas?
thanks!

echo $fulldirectory | cut -d / -f 4-
1 Like
echo "${fulldirectory#/*/*/*/}"
1 Like

thanks for answering :slight_smile: