bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] Is there a way to print a character in the escaped form?


From: Peng Yu
Subject: Re: [bug-gawk] Is there a way to print a character in the escaped form?
Date: Wed, 23 Jan 2019 09:41:31 -0600

On Wed, Jan 23, 2019 at 1:05 AM <address@hidden> wrote:
>
> Peng Yu <address@hidden> wrote:
>
> > I'd expect something more like %q in Go Printf() beatifically print
> > the control characters.
>
> Why would you expect this?  It's not in POSIX, nor has it ever been in
> awk, nor is it necessary to dump every possible feature from every other
> programming language into gawk.
>
> > It can not be easily done in awk?
>
> See the solution David already provided you.

bash's printf also support %q. I think that it is common nowadays to
support %q. There is no reason why gawk cannot support it.

-- 
Regards,
Peng



reply via email to

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