I need to remove one directory (the leftmost) from variables in Bash. I found ways how can I remove all the path or use dirname and others but it was removing a
dirname
Look at man expr
man expr
expr "foo/bar/baz" : '[^/]*/\(.*\)' will do what you want.
expr "foo/bar/baz" : '[^/]*/\(.*\)'