3 ms·
All the main platforms have realpath(1). It was added to GNU Linux over 10 years ago now, to aid portability, and be a more natural command to access this funct
by pixelbeat__ 3y ago
All the main platforms have realpath(1). It was added to GNU Linux over 10 years ago now, to aid portability, and be a more natural command to access this functionality than readlink(1)
- oefrha 3y agoNot really. macOS until version 12 doesn’t have realpath(1), it was only added this year. You can’t rely on it for portable code.
- latexr 3y agoTo clarify, it was added (late) last year, with macos 13 (Ventura).
- inferiorhuman 3y agoSaw a comment on another site mention this, but NetBSD won't get it until 10.0 (not yet released) and OpenBSD got it in 7.1 (released last year). Of course I'm of the mindset that building complex shell scripts is simply an exercise in masochism so this all seems like a solution in search of a problem.