Quotes Inside Quotes C
In c you can use the backslash to put special characters to your string.
Quotes inside quotes c. There are a lot of characters that you write using the backslash. The american rule is that periods always go inside the quotation marks more on that below. String myregularstring2 yet another for you. Use the corresponding ascii character.
Echo i like to use double quotes sometimes. In c there are at least 4 ways to embed a quote within a string. Use the hexadecimal unicode character. 000 null 010 backspace 011 horizontal tab 012 new line 015 carriage return 032 substitute 042 double quote 047 single quote 134 backslash.
If you find yourself writing a quote within a quote within a quote i e three layers deep it s probably best to rework your sentence. The quotes like in the above will be interpreted by bash. Escape quote with a backslash. Precede string with and use double quotes.
For example to put you need to write. Backslash with a number. Also notice that the periods are placed inside the single quotes. Examples string myregularstring here s a double quote character.
You can precede any escaped character with a backslash to preserve that character.