File: template_get_item.awk

package info (click to toggle)
localechooser 2.84
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,612 kB
  • sloc: sh: 1,096; perl: 187; makefile: 71; awk: 42
file content (24 lines) | stat: -rw-r--r-- 357 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# AWK-script to extract specific template from templates file

BEGIN {
    FOUND = 0
}

{
    line=$0

    if (index(line, ITEM) > 0) {
        FOUND = 1
        print line
        getline
        line=$0
    }

    if (FOUND == 1) {
        if (match(line, /^[^\ ]*:/) > 0) {
            FOUND = 0
        } else {
            print line
        }
    }
}