I\'m trying to remove part of the path in a string. I have the path:
/path/to/file/drive/file/path/
I want to remove the first part /
/
If you don't want to hardcode the part you're removing:
$ s='/path/to/file/drive/file/path/' $ echo ${s#$(dirname "$(dirname "$s")")/} file/path/