mirror of
https://github.com/Hizenberg469/Makefile-tutorial.git
synced 2026-04-19 22:02:24 +03:00
some changes
This commit is contained in:
@@ -402,8 +402,8 @@
|
|||||||
| \ | Escape | hell\.o | hell.o |
|
| \ | Escape | hell\.o | hell.o |
|
||||||
| | character - | | NOT:helllo, |
|
| | character - | | NOT:helllo, |
|
||||||
| | escape any of | | hell1o... |
|
| | escape any of | | hell1o... |
|
||||||
| | the special | | |
|
| | the special | | (Usefule with |
|
||||||
| | character, | | |
|
| | character, | | grep) |
|
||||||
| | ignore the | | |
|
| | ignore the | | |
|
||||||
| | meaning of | | |
|
| | meaning of | | |
|
||||||
| | them | | |
|
| | them | | |
|
||||||
@@ -660,3 +660,54 @@
|
|||||||
| read name #richard read name #richard
|
| read name #richard read name #richard
|
||||||
| hello Peter #hello Peter hello Peter #hello Peter
|
| hello Peter #hello Peter hello Peter #hello Peter
|
||||||
| echo $name #Peter echo $name #richard
|
| 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
|
||||||
@@ -1,5 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
: << cmt
|
||||||
|
This is
|
||||||
|
multiline Comments
|
||||||
|
in bash
|
||||||
|
cmt
|
||||||
|
|
||||||
ARRAY=($(ls *.txt))
|
ARRAY=($(ls *.txt))
|
||||||
COUNT=0
|
COUNT=0
|
||||||
echo -e "FILE NAME \t WRITEABLE"
|
echo -e "FILE NAME \t WRITEABLE"
|
||||||
|
|||||||
Reference in New Issue
Block a user