Hi there i am trying to understand why the following does not work:
awk 'BEGIN{ print "it\'s my life" }'
I know that as soon as the first single quote opens before BEGIN, then it searches for a closing single quote that in general it finds it after }. However in my example i want to print somethin with another single quote in it. Because it is going to interrupt the SHELL'S opening and closing of the first and last single quotes, i need to do something, so i escape it and it doesnn't work. I saw this answer How to escape a single quote inside awk but i didn't undertand why. Thanks.