-9

The Bash command sort -k2,2 -k1,1 <people.txt is not displayed properly.

<people.txt is not in the preview. This is not an issue on some other sites.

I can write the command as sort -k2,2 -k1,1 &lt;people.txt to escape it. Is that the right way to do it? May I call it a bug in Stack Overflow?

2
  • 3
    how many spaces is there before the word sort? did you try clearing the line, clicking the code formatting button ({}) and putting the line in again?
    – Memor-X
    May 25, 2017 at 3:51
  • it is taking it as html tag since they are allowed in editor. You should escape it using backticks or use the HTML entity &lt;.
    – Suraj Rao
    May 25, 2017 at 3:53

1 Answer 1

6

You should use the code button {} or give 4 spaces (markdown syntax) to display the bash snippet.

sort  -k2,2 -k1,1 <people.txt

As I mentioned in the comment, it is taking it as html tag since they are allowed in editor. You can escape it using backticks or use the HTML entity &lt;.

sort -k2,2 -k1,1 <people.txt

or

sort -k2,2 -k1,1 <people.txt

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