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
|
BEGIN {
# 1. Should print aCa
IGNORECASE = 1
FS = "[c]"
IGNORECASE = 0
$0 = "aCa"
print $1
# 2. Should print a
IGNORECASE = 1
FS = "[c]"
$0 = "aCa"
print $1
# 3. Should print a
IGNORECASE = 1
FS = "C"
IGNORECASE = 0
$0 = "aCa"
print $1
# 4. Should print aCa
IGNORECASE = 1
FS = "c"
$0 = "aCa"
print $1
# 5. Should print aCa
FS = "xy"
IGNORECASE = 0
FS = "c"
IGNORECASE = 1
$0 = "aCa"
print $1
# 6. Should print aCa
FS = "xy"
IGNORECASE = 0
FS = "c"
IGNORECASE = 1
split("aCa",a)
print a[1]
}
|