I found: "How do I escape backticks in a comment?", but I want to escape backticks, if I use backticks to format code in an answer.

The following doesn't work:

`sudo update-initramfs -v -u -k \`uname -r\``

The result is this:

sudo update-initramfs -v -u -k \uname -r``

Desired goal, but with using backticks:

sudo update-initramfs -v -u -k `uname -r`
share

2 Answers 2

up vote 7 down vote accepted

The following (without four spaces):

``sudo update-initramfs -v -u -k `uname -r` ``

generates the desired goal:

sudo update-initramfs -v -u -k `uname -r`

Source: How can the backtick character ` be included in code?

share

You can indent code by four spaces instead of using a backtick.

`hey everybody`

For more information:

share
1  
I know, I used it in my question. –  BuZZ-dEE Jan 25 '13 at 12:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .