How do you print out a single quote character in AWK? Using the escape character does not seem to work.
{printf "%1$s %2$s%3$s%2$s\n" , "INCLUDE", " \' ", "THIS" }
does not work. Any suggestions?
How do you print out a single quote character in AWK? Using the escape character does not seem to work.
{printf "%1$s %2$s%3$s%2$s\n" , "INCLUDE", " \' ", "THIS" }
does not work. Any suggestions?
awk -v qt="'" ' {printf "%1$s %2$s%3$s%2$s\n" , "INCLUDE", " " qt " ", "THIS" } '
{printf "%1$s %2$s%3$s%2$s\n" , "INCLUDE", " \x27 ", "THIS" }
Thanks for the response worked well. What type of chacter identification is \x27?
27 is the Ascii value of single quote.
\x Escape sequence
27 is ASCII code in hex for '.
awk '{printf "%1$s %2$s%3$s%2$s\n" , "INCLUDE", " '"'"' ", "THIS" }'