[OT] Text stream editing problem
Let's say I want to write a script that can convert the
My basic strategy would be to sed 's|/Directory_.||g'.
Unfortunately this isn't of universal application. I'm looking
for a solution than can take into account all possible names for
The solution I have in mind is to be able to count the "/" and
then cut, say after the Nth match (I will of course have to put a
"./" before every path that doesn't begin with one). Is there a
quick way to do this using only the GNU coreutils?