-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathsession-11.txt
69 lines (51 loc) · 1.06 KB
/
session-11.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
variables
data types
conditions
functions
loops
functions
-----------
it is block of code that can do some work. It accepts inputs too...
FUNC_NAME(){
}
FUNC_NAME
variable, any value repeated inside code can be declared as a variable. declaring variables is a best practice even it is repeating only 1 time.
similary if a a block code is repeating, consider using functions..
logs
------
we should persist/store the logs of any coding, this is the best practice.
Redirections
----------
> --> by default only success output will be redirected...
1 --> success
2 --> Error
& --> Both success and error
>> --> append
there should be no space b/w & and >
&>>
cat > file-name
cat >>
colors
------------
31 --> red color
32 --> green
33 --> yellow
\e[31m --> red color
loops
-----------
for(int i=0; i<20; i++){
print $i;
}
mysql
gcc
chrony
fail2ban
postgis2_94
steps
-----------
log redirection
colors are mandatory
1. user have root access or not
2. send packages to install as parameters
sudo sh install-packages mysql gcc docker
special variable to get all params --> $@