4 ms·
Yep. Though I don't think I've ever seen an actual legitimate use of this capability. I mean really, what's the point of an embedded newline... Actually the Ma
by __david__ 17y ago
Yep. Though I don't think I've ever seen an actual legitimate use of this capability. I mean really, what's the point of an embedded newline...
Actually the Mac uses (or at least "used") a hidden files named "Icon\r" (yes, an embedded carriage return) for its custom folder icons. I'm still not sure that counts as "legitimate".
- blasdel 17y agoI had to write a one-liner to deal with that on Mac OS 10.4 -- had to detect if a user had placed anything on their Desktop, which had a custom folder icon because it was actually a cross-filesystem symlink: desktop=$(test -z $(ls -A1 /Volumes/Documents/Desktop | \ sed -e '/^.DS_Store$/d' -e '/^Icon^M$/d')) The ^M was a literal CR, which would get munged by all my usual editors except vim. I'm sure there's some sturdier way to escape it... I remember choosing to use ls intentionally, but not what sucked about the alternatives.