Why did the bash script get messed up in this post?

Continuing from Does anyone have a good, simple btrfs snapshot backup solution? - #5 by copperi (which is now fixed).

Nice, thanks! What are the formatting issues you came across? Does the external script differ from the one in your post?

I belief the problem is when you click on “Preformatted text” it just format’s the first line (with the 4 spaces) in a script what makes sens for a one-liner.

But for a whole script it would make sens that by clicking on it it comes with the 4 back ticks before and after the script. for example (without the blanks of course):

` ` ` `
(paste your text here)
` ` ` `

At least that was my problem the first time i posted more than one line of Preformatted text </>.


Where did the post one come from ? No difference between that and external. When I originally inserted it all my comments were made to subtitles (markup language).

Oh, looks like @hhlp edited it in. The trick is the backticks as @ilikelinux suggests.

Since you’ve confirmed that the inlined one is the same, I’m going to move the surrounding discussion here to the Site Feedback category to keep it from cluttering the question.

1 Like

hmm :eyes:

Yes @mattdm, This always does the trick.

  1. For a complex code, tree backticks:

→ ```bash|python|java|ruby or whatever program language supported

text here

→ ```

  1. for a simple line of code/command, I personally use only one backtick sudo dnf install program backtick.

sudo dnf install program

  1. for logs and pasted Linux commands I use preformatted text.


This is part of my time here, editing TOPIC with proper indentation… as you suggest from time ago, teaching $USER using the site tools.


Maybe using blockquote or preformatted text.



This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.