File: awk

package info (click to toggle)
ruby-rouge 4.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,836 kB
  • sloc: ruby: 38,168; sed: 2,071; perl: 152; makefile: 8
file content (34 lines) | stat: -rw-r--r-- 612 bytes parent folder | download | duplicates (4)
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
# single-line comment
BEGIN { # end-of-line comment
    # indented single-line comment
    if (length(str) > NF)
        print $42 > expr;
    else
        exit NR;
    while (array[42] != FILENAME)
        break;
    for (i = 0; i < rand(); i++)
        continue;
    for (var in ENVIRON)
        next;
    do
        getline < file;
    while (str ~ /regexp/);
    printf "%d%f", int(42), 0.123 > expr;
    print "string" | pipe;
    ternary = 0 ? 1 : sub(/regexp/, "nope.");
    system("sl");
}

{
    nextfile;
}

END {
    delete array[answer()];
    exit 1;
}

function answer(question) {
    return 42;
}