I'm trying to write an if statement that checks to see if two variables refer to the same file or directory. I can't simply compare the strings, because I want two different strings that refer to the same path.
For example, I would like to check if ./ and ../foobar/ refer to the same directory.
Simply doing test "$path1" -eq "$path2" won't work in some cases.