-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathca_sa_le_ai1.sh
76 lines (59 loc) · 907 Bytes
/
ca_sa_le_ai1.sh
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
70
71
72
73
74
75
76
#!/bin/bash
for ((i=0;i<10;i++));
do
echo "for: $i"
done
#############################
i=0
while [ $i -lt 10 ];
do
echo "while: $i"
let i=i+1
done
#############################
i=0
until [ $i -eq 10 ];
do
echo "until: $i"
let i=i+1
done
#############################
echo "da o valoare pt i"
read i
if [ $i = 0 ]; then
echo "if: $i=0"
else
echo "if: $i!=0"
fi
#############################
function display {
echo "func: $1"
}
for ((i=0;i<10;i++));
do
display $i
done
#############################
i=1
cat psaux.sh|while read linie;
do
echo "linia ${i}: ${linie}"
let i=i+1
done
#############################
if test -d "tmp"
then
echo "directorul tmp exista"
fi
#############################
if pgrep tcsh
then
echo "tcsh ruleaza"
else
echo "nu exista un proces cu numele asta"
fi
#############################
#!/bin/bash
for i in $( ls *.sh); do
echo item: $i
done