GNU bug report logs -
#25009
ls -b fails to escape '-' c-style (ls (GNU coreutils) 8.21)
Previous Next
Reported by: Kay Parker <kayparker <at> mailite.com>
Date: Wed, 23 Nov 2016 23:07:01 UTC
Severity: normal
Tags: notabug
Done: Eric Blake <eblake <at> redhat.com>
Bug is archived. No further changes may be made.
Full log
Message #15 received at 25009 <at> debbugs.gnu.org (full text, mbox):
On 23/11/16 23:27, Eric Blake wrote:
> tag 25009 notabug
> thanks
>
> On 11/23/2016 05:02 PM, Kay Parker wrote:
>> ls -b (ls (GNU coreutils) 8.21): fails to escape '-'
>> 1\ 2\ 3\ -\ 4\ -5\ 6
>> should be: 1\ 2\ 3\ \-\ 4\ \-5\ 6
>
> Why? The documentation states:
>
> -b, --escape print C-style escapes for nongraphic characters
>
> but - looks like a graphical character to me, so it doesn't need an escape.
>
> I don't see a problem here, so I'm marking this as not a bug; however,
> feel free to followup with more details, such as better justification
> for why - should be treated as a nongraphic character.
Note you may be expecting ls to quote the file name
so that it's subsequently usable as a parameter to a command.
In that case --quoting=shell is more appropriate.
This bug report was last modified 8 years and 180 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.