help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] How to print a string in the quote form not in the escap


From: Matthew Cengia
Subject: Re: [Help-bash] How to print a string in the quote form not in the escaped form?
Date: Tue, 26 Apr 2016 23:26:11 +1000

You consider "'" more readable than \'? All I see in the first are 5
apostrophes at first glance; it's hard to tell where one character ends and
the next begins. At least a backslash and an apostrophe are obviously
distinct. It's also one less character. Anyway, I realise I'm not being
productive; sorry, I don't know of any way to easily and tidily do what you
want.

On Tue, Apr 26, 2016 at 11:20 PM, Peng Yu <address@hidden> wrote:

> readability.
>
> On Tue, Apr 26, 2016 at 8:06 AM, Matthew Cengia <address@hidden> wrote:
> > No, there is not. It's escaped; why does it matter how it's escaped?
> >
> > On Tue, Apr 26, 2016 at 10:58 PM, Peng Yu <address@hidden> wrote:
> >>
> >> Hi, printf %q will print the string in the escaped form.
> >>
> >> ~$ printf '%q\n' "'"
> >> \'
> >>
> >> I the above example, I'd like to print it as "'" (including the double
> >> quote). Is there a way to do so? Thanks.
> >>
> >> --
> >> Regards,
> >> Peng
> >>
> >
> >
> >
> > --
> > Regards,
> > Matthew Cengia
>
>
>
> --
> Regards,
> Peng
>



-- 
Regards,
Matthew Cengia


reply via email to

[Prev in Thread] Current Thread [Next in Thread]