Re: Quoting style in C

mathieu <mathieu.malaterre@xxxxxxxxx> wrote:

I was struggling with a weird path. So I decided to use a fancy
option in ls to help me out. But I think the output is incorrect.

mkdir /tmp/bla
touch "/tmp/bla/filename with | pipe"
ls --quoting-style=c /tmp/bla


"filename with \| pipe"

I do not think escaping | is correct in C.

You are right. '\|' is not a defined escape character in C; its value is
(Of course, one might nit-pick and say that the _style_ of escaping is
that used by C, even if this particular escape _character_ is not in the
C Standard.)


Relevant Pages

  • Re: Sunfish gone wrong?3F
    ... > On Tue, 28 Jun 2005, Alex Waugh wrote: ... >>> whenever I read a filename which contains a question mark Sunfish ... But as RISC OS doesn't define an escape character for use in filenames ...
  • Re: Whats up with bash shell and spaces in filenames?
    ... On Monday 10 May 2010 09:32 AM, Tom Killian wrote: ... this suggests that there may be a space at the *beginning* of the filename. ... Try escaping the space, something like this: ... To unsubscribe or change subscription options: ...
  • Re: LUA string question
    ... John Rickman Iyonix wrote: ... I have tried escaping with \ before the + and various other ... (The tutorial on patterns makes my head spin:-( ... % is the escape character ...
  • Re: How get UTF-8 from urlencoded web form
    ... Sinan Unur wrote: ... '%' is the escape character and 'E9' the encoded ... E9 has nothing to do with escaping; ... There is no encoding involved in \n, but there is when you write é ...
  • Re: Append file ext to returned query
    ... I need to append ".html" (the extension) onto $filename so it returns ... Is this an escaping issue? ...