Small correction with missing quotation mark in null example. Removed skipped lines.

TurdPooCharger 2018-04-28 23:50:39 -04:00
parent d81c837707
commit 4c2cea141b

@ -4,50 +4,41 @@ This page delves into greater details about the `echo` command.
The `echo` command is used to output data to the bottom screen. It will display this data and also `(<A> to continue)` underneath the data. The `echo` command is used to output data to the bottom screen. It will display this data and also `(<A> to continue)` underneath the data.
### Syntax & Example ### Syntax & Example
`echo <prompt>` `echo <prompt>`
Example: Example:
`echo "NAND backup has been restored.` `echo "NAND backup has been restored."`
#### Character Set #### Character Set
Including the blank space ` `, these are the available char. Including the blank space ` `, these are the available char.
```!#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~``` ```!#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~```
### Implicit vs Explicit Statements ### Implicit vs Explicit Statements
In general, one worded, simple, or continuous phrases may be implicitly stated. In general, one worded, simple, or continuous phrases may be implicitly stated.
**Example 1** **Example 1**
`echo Hello` `echo Hello`
**Example 2** **Example 2**
`echo Hello_World` `echo Hello_World`
There are limitations for phrases containing certain char, including ` ` `-#$%` There are limitations for phrases containing certain char, including ` ` `-#$%`
These phrases fall under the explicit category in which quotation marks `" "` are necessary. These _can_ be escaped via the use of a backslash, but this should only really be used when there is one character that needs to be escaped. These phrases fall under the explicit category in which quotation marks `" "` are necessary. These _can_ be escaped via the use of a backslash, but this should only really be used when there is one character that needs to be escaped.
**Example 3** **Example 3**
Incorrect: `echo Hello World`
Incorrect: `echo Hello World`
Correct: `echo "Hello World"` Correct: `echo "Hello World"`
**Example 4** **Example 4**
Incorrect: `echo 0:/Nintendo 3DS/`
Incorrect: `echo 0:/Nintendo 3DS/` Correct: `echo "0:/Nintendo 3DS/"`
Correct: `echo "0:/Nintendo 3DS/"`
Also correct (not recommended): `echo 0:/Nintendo\ 3DS/` Also correct (not recommended): `echo 0:/Nintendo\ 3DS/`
### Skipping lines ### Skipping lines
Phrases that are too long may become unreadable if they fill past the right edge of the 3DS bottom screen. Like typing with the **Enter** key for a keyboard, the inclusion of `\n` serves as a break to begin readouts with a new line. Phrases that are too long may become unreadable if they fill past the right edge of the 3DS bottom screen. Like typing with the **Enter** key for a keyboard, the inclusion of `\n` serves as a break to begin readouts with a new line.
**Example 5** **Example 5**
`echo "Hello \nWorld"` `echo "Hello \nWorld"`
> Hello > Hello
@ -55,15 +46,13 @@ Phrases that are too long may become unreadable if they fill past the right edge
In order to skip two lines, care is needed to add ` ` between the two `\n`. In order to skip two lines, care is needed to add ` ` between the two `\n`.
**Example 6** **Example 6**
`echo "Hello \n\nWorld"` `echo "Hello \n\nWorld"`
> Hello > Hello
> World > World
**Example 7** **Example 7**
`echo "Hello \n \nWorld"` `echo "Hello \n \nWorld"`
> Hello > Hello