in reply to How to get the unique canonical path of a given path?

It works good for most cases but I had trouble with paths that start, for example, with ".." (like "../script.sh")

What output do you want for ../script.sh?