4 ms·
Yes, and they also don't add single quotes to filenames that contain whitespace characters when displaying them as mentioned in the article.
by barrister 6y ago
Yes, and they also don't add single quotes to filenames that contain whitespace characters when displaying them as mentioned in the article.
- pwdisswordfish0 6y agoSo then BSD's behavior isn't very useful then, right? You can't actually rely on 1 filename = 1 line.
- barrister 6y agoNo because in the case of the "ls" command, it replaces non-printable characters with a question mark '?', including newline characters. I believe the actual source code for this behavior can be seen here: https://github.com/openbsd/src/blob/master/bin/ls/utf8.c https://github.com/openbsd/src/blob/master/bin/ls/utf8.c
- pwdisswordfish0 6y agoSo then BSD can't be guaranteed to accurately display the filename. Either way, you have to pick a side.