output_redirection : remove NOTE tag.

This commit is contained in:
Dmitry Voronin 2023-10-14 23:13:01 +03:00
parent 8ee5fca358
commit e0046f903a
3 changed files with 31 additions and 2 deletions

View file

@ -0,0 +1,30 @@
# Bash colors.
## How to use.
Most of the time you want to use it with `echo`. To make `echo` respect colors, you need to use `-e` flag like that:
```bash
export color_default="\033[0m"
export color_red="\033[0;31m"
echo -e "${color_red}hello world!${color_default}" # will print "hello world!" in red.
```
## List of colors.
Please note that colors depend on Terminal Emulator and may vary based on its settings.
|Color|Code|
|---|---|
|default|`\033[0m`|
|blue|`\033[0;34m`|
|blue (bold)|`\033[1;34m`|
|cyan|`\033[0;36m`|
|cyan (bold)|`\033[1;36m`|
|green|`\033[0;32m`|
|green (bold)|`\033[1;32m`|
|purple|`\033[0;35m`|
|purple (bold)|`\033[1;35m`|
|red|`\033[0;31m`|
|red (bold)|`\033[1;31m`|
|white|`\033[0;37m`|
|white (bold)|`\033[1;37m`|
|yellow|`\033[0;33m`|
|yellow (bold)|`\033[1;33m`|

View file

@ -8,7 +8,7 @@ echo "hello" | base64
## file. ## file.
```bash ```bash
echo "hello" > file.txt # write "hello" to file.txt. echo "hello" > file.txt # write "hello" to file.txt.
less < file.txt # read from file.txt and send to less. NOTE: program must support reading from stdin. less < file.txt # read from file.txt and send to less. program must support reading from stdin.
``` ```
## output as argument. ## output as argument.

View file

@ -1 +0,0 @@
TODO: add info about colors.