Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
Instead of sh, use shell or console. So this: ```shell # echo hi ``` ```console # echo hi ``` Is rendered as: # echo hi # echo hi While this: ```bash # echo hi ``` ```sh #...
Answer
#5: Post edited
- Instead of `sh`, use `shell` or `console`.
- So this:
- ~~~markdown
- ```shell
- # echo hi
- ```
- ```console
- # echo hi
- ```
- ~~~
- Is rendered as:
- ```shell
- # echo hi
- ```
- ```console
- # echo hi
- ```
- While this:
- ~~~markdown
- ```bash
- # echo hi
- ```
- ```sh
- # echo hi
- ```
- ~~~
- Is rendered as:
- ```bash
- # echo hi
- ```
- ```sh
- # echo hi
- ```
- ---
- Below are the same code blocks as images (just in case the highlight engine[^1] changes in the future).
- With `shell` and `console`:
- ![code highlighted as shell console session](https://software.codidact.com/uploads/8syystrxcnewursbpxmjko28sgrr)
- With `bash` and `sh`:
- ![code highlighted as shell script](https://software.codidact.com/uploads/cdmu1e035kez8j85jd6ucfsavdjz)
- ---
That might a little bit confusing, but `bash` and `sh` refers to "shell script" (which treats `#` as a comment), while `shell` and `console` refers to a "shell session", hence they treat the initial `#` as the prompt.- [^1]: Currently, Codidact uses [highlight.js](https://highlightjs.org)
- Instead of `sh`, use `shell` or `console`.
- So this:
- ~~~markdown
- ```shell
- # echo hi
- ```
- ```console
- # echo hi
- ```
- ~~~
- Is rendered as:
- ```shell
- # echo hi
- ```
- ```console
- # echo hi
- ```
- While this:
- ~~~markdown
- ```bash
- # echo hi
- ```
- ```sh
- # echo hi
- ```
- ~~~
- Is rendered as:
- ```bash
- # echo hi
- ```
- ```sh
- # echo hi
- ```
- ---
- Below are the same code blocks as images (just in case the highlight engine[^1] changes in the future).
- With `shell` and `console`:
- ![code highlighted as shell console session](https://software.codidact.com/uploads/8syystrxcnewursbpxmjko28sgrr)
- With `bash` and `sh`:
- ![code highlighted as shell script](https://software.codidact.com/uploads/cdmu1e035kez8j85jd6ucfsavdjz)
- ---
- That might be a little bit confusing, but `bash` and `sh` refers to "shell script" (which treats `#` as a comment), while `shell` and `console` refers to a "shell session", hence they treat the initial `#` as the prompt.
- [^1]: Currently, Codidact uses [highlight.js](https://highlightjs.org)
#4: Post edited
- Instead of `sh`, use `shell` or `console`.
- So this:
- ~~~markdown
- ```shell
- # echo hi
- ```
- ```console
- # echo hi
- ```
- ~~~
- Is rendered as:
- ```shell
- # echo hi
- ```
- ```console
- # echo hi
- ```
- While this:
- ~~~markdown
- ```bash
- # echo hi
- ```
- ```sh
- # echo hi
- ```
- ~~~
- Is rendered as:
- ```bash
- # echo hi
- ```
- ```sh
- # echo hi
- ```
- ---
Below are the same code blocks as images (just in case highlight engine changes in the future).- With `shell` and `console`:
- ![code highlighted as shell console session](https://software.codidact.com/uploads/8syystrxcnewursbpxmjko28sgrr)
- With `bash` and `sh`:
- ![code highlighted as shell script](https://software.codidact.com/uploads/cdmu1e035kez8j85jd6ucfsavdjz)
- ---
- That might a little bit confusing, but `bash` and `sh` refers to "shell script" (which treats `#` as a comment), while `shell` and `console` refers to a "shell session", hence they treat the initial `#` as the prompt.
- Instead of `sh`, use `shell` or `console`.
- So this:
- ~~~markdown
- ```shell
- # echo hi
- ```
- ```console
- # echo hi
- ```
- ~~~
- Is rendered as:
- ```shell
- # echo hi
- ```
- ```console
- # echo hi
- ```
- While this:
- ~~~markdown
- ```bash
- # echo hi
- ```
- ```sh
- # echo hi
- ```
- ~~~
- Is rendered as:
- ```bash
- # echo hi
- ```
- ```sh
- # echo hi
- ```
- ---
- Below are the same code blocks as images (just in case the highlight engine[^1] changes in the future).
- With `shell` and `console`:
- ![code highlighted as shell console session](https://software.codidact.com/uploads/8syystrxcnewursbpxmjko28sgrr)
- With `bash` and `sh`:
- ![code highlighted as shell script](https://software.codidact.com/uploads/cdmu1e035kez8j85jd6ucfsavdjz)
- ---
- That might a little bit confusing, but `bash` and `sh` refers to "shell script" (which treats `#` as a comment), while `shell` and `console` refers to a "shell session", hence they treat the initial `#` as the prompt.
- [^1]: Currently, Codidact uses [highlight.js](https://highlightjs.org)
#3: Post edited
- Instead of `sh`, use `shell` or `console`.
- So this:
- ~~~markdown
- ```shell
- # echo hi
- ```
- ```console
- # echo hi
- ```
- ~~~
- Is rendered as:
- ```shell
- # echo hi
- ```
- ```console
- # echo hi
- ```
- While this:
- ~~~markdown
- ```bash
- # echo hi
- ```
- ```sh
- # echo hi
- ```
- ~~~
- Is rendered as:
- ```bash
- # echo hi
- ```
- ```sh
- # echo hi
- ```
- ---
- Below are the same code blocks as images (just in case highlight engine changes in the future).
- With `shell` and `console`:
- ![code highlighted as shell console session](https://software.codidact.com/uploads/8syystrxcnewursbpxmjko28sgrr)
- With `bash` and `sh`:
- ![code highlighted as shell script](https://software.codidact.com/uploads/cdmu1e035kez8j85jd6ucfsavdjz)
- ---
That might a little bit confusing, but `bash` and `sh` refers to "shell script" (which treats `#` as a comment), while `shell` and `console` refers to a "shell session", hence they treat the initial `#`as the prompt.
- Instead of `sh`, use `shell` or `console`.
- So this:
- ~~~markdown
- ```shell
- # echo hi
- ```
- ```console
- # echo hi
- ```
- ~~~
- Is rendered as:
- ```shell
- # echo hi
- ```
- ```console
- # echo hi
- ```
- While this:
- ~~~markdown
- ```bash
- # echo hi
- ```
- ```sh
- # echo hi
- ```
- ~~~
- Is rendered as:
- ```bash
- # echo hi
- ```
- ```sh
- # echo hi
- ```
- ---
- Below are the same code blocks as images (just in case highlight engine changes in the future).
- With `shell` and `console`:
- ![code highlighted as shell console session](https://software.codidact.com/uploads/8syystrxcnewursbpxmjko28sgrr)
- With `bash` and `sh`:
- ![code highlighted as shell script](https://software.codidact.com/uploads/cdmu1e035kez8j85jd6ucfsavdjz)
- ---
- That might a little bit confusing, but `bash` and `sh` refers to "shell script" (which treats `#` as a comment), while `shell` and `console` refers to a "shell session", hence they treat the initial `#` as the prompt.
#2: Post edited
- Instead of `sh`, use `shell` or `console`.
- So this:
- ~~~markdown
- ```shell
- # echo hi
- ```
- ```console
- # echo hi
- ```
- ~~~
- Is rendered as:
- ```shell
- # echo hi
- ```
- ```console
- # echo hi
- ```
- While this:
- ~~~markdown
- ```bash
- # echo hi
- ```
- ```sh
- # echo hi
- ```
- ~~~
- Is rendered as:
- ```bash
- # echo hi
- ```
- ```sh
- # echo hi
- ```
- ---
- That might a little bit confusing, but `bash` and `sh` refers to "shell script" (which treats `#` as a comment), while `shell` and `console` refers to a "shell session", hence they treat the initial `#`as the prompt.
- Instead of `sh`, use `shell` or `console`.
- So this:
- ~~~markdown
- ```shell
- # echo hi
- ```
- ```console
- # echo hi
- ```
- ~~~
- Is rendered as:
- ```shell
- # echo hi
- ```
- ```console
- # echo hi
- ```
- While this:
- ~~~markdown
- ```bash
- # echo hi
- ```
- ```sh
- # echo hi
- ```
- ~~~
- Is rendered as:
- ```bash
- # echo hi
- ```
- ```sh
- # echo hi
- ```
- ---
- Below are the same code blocks as images (just in case highlight engine changes in the future).
- With `shell` and `console`:
- ![code highlighted as shell console session](https://software.codidact.com/uploads/8syystrxcnewursbpxmjko28sgrr)
- With `bash` and `sh`:
- ![code highlighted as shell script](https://software.codidact.com/uploads/cdmu1e035kez8j85jd6ucfsavdjz)
- ---
- That might a little bit confusing, but `bash` and `sh` refers to "shell script" (which treats `#` as a comment), while `shell` and `console` refers to a "shell session", hence they treat the initial `#`as the prompt.
#1: Initial revision
Instead of `sh`, use `shell` or `console`. So this: ~~~markdown ```shell # echo hi ``` ```console # echo hi ``` ~~~ Is rendered as: ```shell # echo hi ``` ```console # echo hi ``` While this: ~~~markdown ```bash # echo hi ``` ```sh # echo hi ``` ~~~ Is rendered as: ```bash # echo hi ``` ```sh # echo hi ``` --- That might a little bit confusing, but `bash` and `sh` refers to "shell script" (which treats `#` as a comment), while `shell` and `console` refers to a "shell session", hence they treat the initial `#`as the prompt.