some changes

This commit is contained in:
2025-02-25 11:28:57 +00:00
parent 4372a9042b
commit 9f75c25379
2 changed files with 59 additions and 2 deletions

View File

@@ -402,8 +402,8 @@
| \ | Escape | hell\.o | hell.o |
| | character - | | NOT:helllo, |
| | escape any of | | hell1o... |
| | the special | | |
| | character, | | |
| | the special | | (Usefule with |
| | character, | | grep) |
| | ignore the | | |
| | meaning of | | |
| | them | | |
@@ -660,3 +660,54 @@
| read name #richard read name #richard
| hello Peter #hello Peter hello Peter #hello Peter
| echo $name #Peter echo $name #richard
-> Comments:
* Single line:
use: #
* Multi-line:
use: : << cmt
This is
multiline Comments
in bash
cmt
-> String in double quotes:
In double quotes the variable value is replaced
but the special character like * (wildcard)
character is not replaced.
Special character is replaced when used without
double quotes and without double quotes use '\'
before it to supress the behaviour of special
characters.
-> source keyword:
source keyword is used to run the shell script
in the same bash shell.
Since, running a shell scripts run the script
in seperate bash shell by default, running it
with source keyword run the script in same bash
shell.
Syntax:
source ./<script-name>
-> := operator:
This operator only used to initialize uninitialized
variable with a value.
Syntax:
hh = 4;
hh := 5;
echo hh
Output:
4