/
lek.lux
57 lines (47 loc) · 802 Bytes
/
lek.lux
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
# Run as:
# lux lek.lux
[config timeout=2000]
[global bob=23]
[macro monkey]
!echo "shark"
?shark
!echo "dogShark"
?dog[Ssv]hark
[endmacro]
[macro testVar]
!echo $bob
?23
[endmacro]
[macro testVar2]
!echo $lobb
?12
[endmacro]
[macro myVar]
[my kobb=2342]
!echo $kobb
?2342
[endmacro]
[shell apa]
[local xxx=Haj]
!echo "Hej"
# Match exactly, no regex or variable replacement
???Hej
!echo "Haj"
# regex shut off but variable replacement still on
??$xxx
[invoke monkey]
[local lobb=12]
[invoke testVar2]
[shell bepa]
!echo "hoj"
?hoj
[invoke testVar]
[local lobb=12]
[invoke testVar2]
[invoke myVar]
[shell final]
[global bob=2999]
!echo $bob
?2999
[cleanup]
!echo "hej"