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

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 106

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>