Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/bin/ls
Jan Schaumann <jschauma%netmeister.org@localhost> writes:
> "Perry E. Metzger" <perry%piermont.com@localhost> wrote:
>>
>> Jan Schaumann <jschauma%netmeister.org@localhost> writes:
>
>> > Running 'ls -b "foo bar"' yields:
>> >
>> > On Lunix: foo\ bar
>> > On IRIX: foo\0x4bar
>> > On Solaris: foo bar
>> > On NetBSD: foo bar
>>
>> I think shockingly, the Linux behavior seems most in accord with what
>> one would expect -b to do (and with what is most useful to the user.)
>
> Actually, if the manual page that '-b' "prints octal escapes for
> nongraphic characters", then using "\ " for a space doesn't seem
> quite correct.
That's not what the manual says for -b -- it is what it says for -B.
-B Force printing of non-printable characters in file names as \xxx,
where xxx is the numeric value of the character in octal.
-b As -B, but use C escape codes whenever possible.
So -b uses "escape codes" and not "octal escapes".
POSIX/SuS does not define the behavior of -B and -b, so I think we can
go for what is "most reasonable".
Perry
Home |
Main Index |
Thread Index |
Old Index