Skip to content

Instantly share code, notes, and snippets.

@peerapach
Created April 24, 2020 16:59
Show Gist options
  • Save peerapach/81cc928eb51bdf5fd19a26b0afbe898b to your computer and use it in GitHub Desktop.
Save peerapach/81cc928eb51bdf5fd19a26b0afbe898b to your computer and use it in GitHub Desktop.
print single quote in awk
awk -v q="'" '{print "value is" q $1 q}' inputfile
or
awk '{print "value is \x27" $1 "\x27"}' inputfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment