New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
suggestion: mention escape character #75
Comments
Thanks for the suggestion. I think maybe extras/discussion.md would be a suitable place for this, rather than adding it to episode 6. |
I created PR #83 in an attempt to address this issue. Feedback would be welcome. (This is for instructor-training) |
@bernhold well done. I actually did not know that you can use I would probably still call the escape of a dollar sign "escape" rather than "quote" dollar sign simply because the most of the people learning make know bits of bash already, therefore they most likely know the concept of escaping (like spaces in folder names etc). |
Thanks! I used the terminology I found in the GNU Make manual, but I have no problem changing it if there is a consensus for "escape" instead. Although one slightly tricky thing is that escapes in bash are pretty uniformly the backslash character, while in this case they are not. But of course it is the same concept. So either way, as far as I'm concerned. |
Interesting. I have never spotted this "quote" terminology before, but indeed in make manual they use it a lot. Then maybe it would be good just to mention something like "The quoting using $ follows same principle as escaping by character It is hard to me to judge what is consensus. However, when I would see such a paragraph I would wonder what is the difference to escaping. |
Updated PR #83 to address your suggestion @KamilSJaron |
#83 Fixes this issue. |
The only feature of make not mentioned in this great tutorial that I found useful so far is the escape character
$
for bash/awk oneliners. For instance an extracting a column of a text file using awk requires in bash command likeawk '{print $1}'
, but$
symbol have to be escaped in make by another$
, so the correct form in make isawk '{print $$1}'
. It is also useful to access environmental variables.I think this could be explained in 06-variables.md and would not take more than 5 minutes. I you think it as a good idea, I can try to make a pull request...
The text was updated successfully, but these errors were encountered: