Quantcast
Channel: Active questions tagged fish - Stack Overflow
Viewing all articles
Browse latest Browse all 127

In Fish, how do I check that two paths are the same?

$
0
0

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.


Viewing all articles
Browse latest Browse all 127

Trending Articles