Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
it does work, but writes the double quotes too, as
they also were part of the string.
That's different from the original idea.
Also you used single quotes before BEGIN and at the end of the line.
Let me know if you find some other solution.
Sorry, I thought you wanted the quotes. In that case...
awk 'BEGIN {print "Don\x27t Panic" }'
... is what you want.
Why do you care about using single quotes around the awk command? Are you just trying to understand how the t shell works with quote marks? I've always had a hard time keeping that straight, and generally just mess around until I find what works.
Well the short answer is that the bash shell and the tcsh shell just handle quote marks differently depending on what the authors thought would work best.
If you read up on bash, on tcsh and on awk, I'm sure you'll get it all sorted out as to how each behaves and they're not totally inconsistent with each other. But, speaking for myself, it's hard to keep that clear in my memory so usually in a situation like that I just mess around with various combinations until I hit on the one that works. With experience it doesn't take long.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.