[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: |
Tue, 22 Jan 2019 15:18:22 -0600 |
> this worked for me: (I entered 2 lines after the command)
> $ awk '{gsub("\t", "\\t", $0); print }'
> a a
> a\ta
> a b c
> a\tb\tc
I'd expect something more like %q in Go Printf() beatifically print
the control characters. It can not be easily done in awk?
--
Regards,
Peng