in reply to Replacing substrings with links

> Each key is a path, which is the absolute path of the value. For example:

> realpath /p # Yields /a/b/c

> For each value, I would like to replace the substring with the other link, if such exists. In our case, we have "/a/b/c/dt/sde/tools/em64t_SUSE/tool/0.9.0" and "/a/b/c" => "/p" , so I would like to have:

You are aware that a file system can have multiple links pointing to the same "realpath", right?

And if you had multiple links qualifying like an additional "/a/b" => "/q" you'd probably want to replace "/a/b/c" first to have a shorter result.

This will become pretty messy without further clarification.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery