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 /path/to/file/drive
and produce the output:
file/path/
Note: I have several paths in a while loop, with the same /path/to/file/drive
in all of them, but I'm just looking for the 'how to' on removing the desired string.
I found some examples, but I can't get them to work:
echo /path/to/file/drive/file/path/ | sed 's:/path/to/file/drive:2:'
echo /path/to/file/drive/file/path/ | sed 's:/path/to/file/drive:2'
2
being the second part of the string and I'm clearly doing something wrong...maybe there is an easier way?