Add a minimal constants.awk for Caml. (sh)

git-svn-id: 30a5f035a20f1bc647618dbad7eea2a951b61b7c@2849 91a5dbb7-01b9-0310-9b5f-b28072856b6e

###############################################################################
# BRLTTY - A background process providing access to the console screen (when in
#          text mode) for a blind person using a refreshable braille display.
#
# Copyright (C) 1995-2006 by The BRLTTY Developers.
#
# BRLTTY comes with ABSOLUTELY NO WARRANTY.
#
# This is free software, placed under the terms of the
# GNU General Public License, as published by the Free Software
# Foundation.  Please see the file COPYING for details.
#
# Web Page: http://mielke.cc/brltty/
#
# This software is maintained by Dave Mielke <dave@mielke.cc>.
###############################################################################

BEGIN {
  print "type t ="
}

END {
}

function brlCommand(name, symbol, value, help) {
  writeCommandDefinition(name, value, help)
}

function brlBlock(name, symbol, value, help) {

  if (value ~ /^0[xX][0-9a-fA-F]+00$/) {
    writeCommandDefinition(name, hexadecimalValue(value) "00", help)
  }
}

function brlKey(name, symbol, value, help) {
#  print "braille key:"
#  print name symbol value
#  print "(** " help " *)"
}

function brlFlag(name, symbol, value, help) {
#  if (value ~ /^0[xX][0-9a-fA-F]+0000$/) {
#    value = hexadecimalValue(substr(value, 1, length(value)-4))
#    if (name ~ /^CHAR_/) {
#      name = substr(name, 6)
#    } else {
#      value = value "00"
#    }
#  } else if (value ~ /^\(/) {
#    gsub("BRL_FLG_", "KEY_FLG_", value)
#  } else {
#    return
#  }
#  writeCamlConstant("int", "KEY_FLG_" name, value, help)
}

function brlDot(number, symbol, value, help) {
#  writeCamlConstant("int", "DOT" number, value, help)
}

function apiConstant(name, symbol, value, help) {
#  writeCamlConstant("int", name, value);
}

function apiMask(name, symbol, value, help) {
#  writeCamlConstant("long", "KEY_" name, hexadecimalValue(value) "L");
}

function apiShift(name, symbol, value, help) {
#  writeCamlConstant("int", "KEY_" name, hexadecimalValue(value));
}

function apiType(name, symbol, value, help) {
#  writeCamlConstant("int", "KEY_TYPE_" name, hexadecimalValue(value));
}

function apiKey(name, symbol, value, help) {
#  value = hexadecimalValue(value)
#
#  if (name == "FUNCTION") {
#    for (i=0; i<35; ++i) {
#      writeKeyDefinition("F" (i+1), "(" value " + " i ")")
#    }
#  } else {
#    writeKeyDefinition(name, value)
#  }
}

function writeCommandDefinition(name, value, help) {
  print "  | CMD_" name " (** " help " *)"
}

function writeKeyDefinition(name, value) {
#  writeCamlConstant("int", "KEY_SYM_" name, value)
}

function writeCamlConstant(type, name, value, help) {
#  writeCamldocComment(help)
#  print "  public static final " type " " name " = " value ";"
}

function writeCamldocComment(text) {
#  if (length(text) > 0) print " (** " text " *)"
}

function hexadecimalValue(value) {
  value = tolower(value)
  gsub("x0+", "x", value)
  gsub("x$", "x0", value)
  return value
}

error: pathspec 'Bindings/Caml/constants.awk' did not match any file(s) known to git


A script that allows comparison between two S4 runs.

git-svn-id: a8b04003a33e1d3e001b9d20391fa392a9f62d91@1467 94700074-3cef-4d97-a70e-9c8c206c02f5

#
#
# An [gn]awk script that allows a comparison between two runs of S4
# This script will annotate the output of S4 with the corresponding
# WER from a given previously collected S4 output.  This is useful
# when tuning the recognizer.
#
# Typical usage:
#
# make an4_words_trigram > results.out &
# tail -f results.out | gawk -f compareResults.awk previousResults.out
#
#
BEGIN {
        other = ARGV[1];
        ARGV[1] = "";
        print ARGV[1];
}

$1 != "Words:" { print $0; }

$1 == "Words:" {
   words = $2;
   while (getline oRes < other > 0) {
       split(oRes, arr);
       if (arr[1] == "Words:" && arr[2] == words) {
           otherWER = arr[6];
           break;
       }
   }
   printf("%s  Previous WER: %s\n", $0, otherWER);
}

error: pathspec 'scripts/compareResults.awk' did not match any file(s) known to git


a short script used to make a cpu runs 100%

error: pathspec 'runCPU.awk' did not match any file(s) known to git


normal and tumor indexes have to be added as command-line parameters -v NORMAL_IDX=10 -v TUMOUR_IDX=9

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/szilvajuhos/CAW.git/'


remove useless file

remove useless file

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/mancoast/cado-nfs.git/'


fix _

fix _

git-svn-id: 193148810cf65385f3a195dbc9a8b504846da3a2@4139 ec53bebd-3082-4978-b11e-865c3cabbd6b

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/madscientist159/heimdal.git/'


text matching

text matching

This example uses the sub() function to make a change to the input record. (sub() replaces the first instance of any text matched by the first argument with the string provided as the second argument; see String-Manipulation Functions.) Here, the regexp /a+/ indicates “one or more ‘a’ characters,” and the replacement text is ‘<A>’.

echo aaaabcd | awk '{ sub(/a+/, "<A>"); print }'

error: pathspec 'REGEX/txt.awk' did not match any file(s) known to git


2008-05-14  Martin Sebor  <sebor@roguewave.com>

	* bin/xcomp.awk (get_gzlogfname): Temporarily hardcoded "logs/"
	as the directory prefix for logs HTML href tags, until a cleaner
	solution is devised.

git-svn-id: 8ce9432b95a2a271c6c279131eb1bb968a8ee7fb@656477 13f79535-47bb-0310-9956-ffa450edef68

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/pathscale/stdcxx.git/'


make grammar_to_rules work with actions, sort of

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/darkfoxprime/foxCAT.git/'


use full prototype for main

use full prototype for main

git-svn-id: 193148810cf65385f3a195dbc9a8b504846da3a2@11676 ec53bebd-3082-4978-b11e-865c3cabbd6b


Add AWK script to compute the corrected sample standard deviation

#!/usr/bin/env awk -f
#
# Computes the corrected sample standard deviation.
#
# Usage: stdev
#
# Input:
#   - a column of numbers
#
# Output:
#   - corrected sample standard deviation
#
# Notes:
#   - Uses [Welford's method][1].
#
# [1]: https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Online_algorithm

BEGIN {
	delta = 0
	mean = 0
	M2 = 0
	N = 0
}
{
	N += 1
	delta = $1 - mean
	mean += delta / N
	M2 += delta * ($1 - mu)
}
END {
	if (N < 2) {
		print 0
	} else {
		print sqrt(M2 / (N-1))
	}
}

error: pathspec 'tools/awk/stdev.awk' did not match any file(s) known to git


added one more auxiliary script for getting random vectors

#!/usr/bin/awk -f

##################################################################
BEGIN {
    FS = "\t"
    if (ARGC != 4) {
	printf("Incorrect number of arguments.") > "/sys/stderr"
	exit 1
    }

    ret = 0
    WCL = 0 + ARGV[1]
    # obtain words to fetch
    ifile = ARGV[2]
    while ((ret = (getline < ifile)) > 0) {
	if (!NF)
	    continue
	else if (NF != 2) {
	    printf("Incorrect line format: %s", $0) > "/sys/stderr"
	    exit 2
	}
	WORD2SEEK[$1] = ""
    }
    ARGV[1] = ARGV[2] = ""
    # obtain random line numbers to fetch
    srand()
    wcl = WCL - 1
    for (i = 1; i < WCL; ++i) {
	randarr[i] = rand() * wcl + 1
    }
    asorti(randarr, tmparr)
    delete randarr
    wcl = WCL / 100
    for (i = 1; i < WCL; ++i) {
	FNR2SEEK[tmparr[i]] = ""
    }
}

##################################################################
NF && FNR > 1 && ($1 in WORD2SEEK || FNR in FNR2SEEK)

error: pathspec 'scripts/get_vectors.awk' did not match any file(s) known to git


Make script to process top level BritBox shows

BEGIN {
    FS="\t"
    print "Sortkey\tTitle\tSeasons\tDuration\tYear\tRating\tDescription"
}

# if needed for debugging record placment, replace "/nosuchrecord/" below
/nosuchrecord/ {
    print ""
    print NR " - " $0
    for ( i = 1; i <= NF; i++ ) {
        print "field " i " = " $i
    }
}

{
    for ( i = 1; i <= NF; i++ ) {
        if ($i == "null")
            $i = ""
    }
}

/\/us\/movie\/|\/us\/show\//{
    URL = $3
    showTitle = $4
    Year = $5
    NumSeasons = $6
    Duration = $7
    Rating = $8
    Description = $9

    sub (/ Season[s]/,"",NumSeasons)
    sub( / min/,"",Duration)

    # Convert duration from minutes to HMS
    secs = 0
    mins = Duration % 60
    hrs = int(Duration / 60)
    HMS = sprintf ("%02d:%02d:%02d", hrs, mins, secs)

    # Titles starting with "The" should not sort based on "The"
    if (match (showTitle, /^The /)) {
        showTitle = substr(showTitle, 5) ", The"
    }
}

/\/us\/movie\// {
    # Extract movie sortkey from URL
    nflds = split (URL,fld,"_")
    if (URL ~ /_[[:digit:]]*$/) {
        sortkey = sprintf ("M%05d", fld[nflds])
        printf \
            ("%s %s - mv\t=HYPERLINK(\"https://www.britbox.com%s\";\"%s, %s, %s\"\)\t\t%s\t%s\t%s\t%s\n", \
             showTitle, sortkey, URL, showTitle, sortkey, \
             Title, HMS, Year, Rating, Description)
    }
    next
}

/\/us\/show\// {
    # Extract show sortkey from URL
    nflds = split (URL,fld,"_")
    if (URL ~ /_[[:digit:]]*$/) {
        sortkey = sprintf ("S%05d", fld[nflds])
        printf \
            ("%s %s - sh\t=HYPERLINK(\"https://www.britbox.com%s\";\"%s, %s, %s\"\)\t\t%s\t%s\t%s\t%s\n", \
             showTitle, sortkey, URL, showTitle, sortkey, \
             Title, HMS, Year, Rating, Description)
    }
    next
}

error: pathspec 'getBritBoxProgramsFrom-webscraper.awk' did not match any file(s) known to git


2011-08-08: parsegaspriceshtml.awk: Created.

BEGIN {
   False=0
   True=!False
   i=0
   inGasPriceRecord=False
   expectName=False
}

/
<div class=\"p","")
   sub("^[ ]*

[ ]*$","")
   # print
   price[i]=$0
}

inGasPriceRecord && /
/ {
   sub("^[ ]*
","")
   sub("
[ ]*$","")
   sub("&","\\&")
   address[i,ai[i]]=$0
   # print "address["ai[i]"]="address[i,ai[i]]
   ai[i]++
}

inGasPriceRecord && /
/ {
   expectName=True
}

inGasPriceRecord && expectName && /<a href="/ {
   expectName=False
   sub("[ ]*$","")
   sub("^.*>","")
   sub("&","\\&")
   name[i]=$0
   # print
}

inGasPriceRecord && / class="p_area">/ {
   sub("^.* class=\"p_area\">","")
   sub("[ ]*$","")
   area[i]=$0
   # print
}

inGasPriceRecord && /<a href="\/Profile[.]aspx[?]member=/ {
   sub("^.*<a href=\"/Profile[.]aspx[?]member=","")
   sub("\".*$","")
   reporter[i]=$0
   # print
}

inGasPriceRecord && expectRelativeTime {
   expectRelativeTime=False
   sub("^[ ]*","")
   sub("[ ]ago[ ]*$","")
   timeAgo[i]=$0
   # print
}

inGasPriceRecord && /<div class="tm" / {
   sub("^[ ]*
[ ]*$","")
   time[i]=$0
   expectRelativeTime=True
   # print
}

inGasPriceRecord && /<\/tr>/ {
   i ++
   # print "EOR"
   # print $0
   inGasPriceRecord=False
}

END {
   for (j=0;j<i && True;j++) {
      if (False) {
         print j
         print price[j]
         print name[j]
         print address[j,0]
         print area[j]
         print reporter[j]
         print time[j]
         print timeAgo[j]
      }

      delimiter="\t"
      print price[j] delimiter name[j] delimiter address[j,0] delimiter area[j] delimiter reporter[j] delimiter time[j] delimiter timeAgo[j]
   }
}

error: pathspec 'parsegaspriceshtml.awk' did not match any file(s) known to git


forgot pop_push.awk

forgot pop_push.awk

BEGIN	{ print "#define CONDBRA        '\001'" > "pop_push.h"
	  print "#define JUMP           '\002'" >> "pop_push.h"
	  print "#define HASLABEL       '\004'" >> "pop_push.h"
	  print "#include \"pop_push.h\""
	  print
	  print "char *pop_push[] = {"
	  print "\"\","
	  switch = 0
}
/aar/	{ switch = NR }
	{ if (switch) {
	      printf("\"%s\",\n",$3)
	      col_2[NR-switch] = $2
	  }
	}
END	{ print "};"
	  print
	  print "char flow_tab[]= {"
	  print "'\000',"
	  for(i=0; i < NR-switch; i++) {
		inf = col_2[i]
		f_out = ""
		if (substr(inf,1,1)=="b") f_out = "HASLABEL|"
		if (substr(inf,2,1)=="c") f_out = f_out "CONDBRA"
		else if (substr(inf,2,1)=="t") f_out = f_out "JUMP"
		else f_out = "'\000'"
		print f_out","
	  }
	  print "};"
	}

error: pathspec 'util/opt/pop_push.awk' did not match any file(s) known to git


Add AWK script to compute the unbiased sample variance

#!/usr/bin/env awk -f
#
# Computes the unbiased sample variance.
#
# Usage: variance
#
# Input:
#   - a column of numbers
#
# Output:
#   - unbiased sample variance
#
# Notes:
#   - Uses [Welford's method][1].
#
# [1]: https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Online_algorithm

BEGIN {
	delta = 0
	mean = 0
	M2 = 0
	N = 0
}
{
	N += 1
	delta = $1 - mean
	mean += delta / N
	M2 += delta * ($1 - mu)
}
END {
	if (N < 2) {
		print 0
	} else {
		print M2 / (N-1)
	}
}

error: pathspec 'tools/awk/variance.awk' did not match any file(s) known to git


iorev_tagger now working (file was missing)

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@8324 e6417c60-b987-48fd-844e-b20f0fcc1017

#!/usr/bin/awk -f

BEGIN {

    LINE_FC_INDEX = 1
    LINE_T_INDEX = 1
#     split(substr($lines, 2, length($lines)), LINES_LIST)
    split(substr(lines_fc,2,length(lines_fc)), LINES_FC_LIST, "_")
    split(substr(lines_t,2,length(lines_t)), LINES_T_LIST, "_")
    NEWFC = 0
    NEWT = 0

#     print "lines_fc " lines_fc | "cat 1>&2"
#     print "lines_fc_list[2] " LINES_FC_LIST[2] | "cat 1>&2"
#     print LINES_T_LIST[1] | "cat 1>&2"

}

NR == LINES_FC_LIST[LINE_FC_INDEX] {
    NEWFC = 1
}

NR == LINES_T_LIST[LINE_T_INDEX] {
    NEWT = 1
}

{
    if (NEWT == 1) {
        print $0 " //IOREV _todo_"
        LINE_T_INDEX = LINE_T_INDEX + 1
        NEWT = 0
    }
    else
        print $0
}

$0 ~ "{" {
#     print "reached braces"
    if (NEWFC == 1) {
        NEWFC = 0
        LINE_FC_INDEX = LINE_FC_INDEX + 1
        print "//IOREV _todo_"
    }
}

error: pathspec 'seqan/misc/iorev_tagger_level2.awk' did not match any file(s) known to git


add prntblk

add prntblk

- util for printing a block of text
  matching between two regular expressions

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/grafoo/utl.git/'


Added an awk script to check for leaks in the memory logging output we just added.

# 7 april 2015

$2 == "alloc" {
	if ($1 in A) {
		problem($1 " already allocated (" A[$1] "); allocated at " NR)
		next
	}
	A[$1] = type()
	next
}

$2 == "realloc" {
	if (!($1 in A)) {
		problem($1 " not yet allocated; reallocated at " NR)
		next
	}
	if ($3 in A) {
		problem($3 " already allocated (" A[$3] "); reallocated at " NR)
		next
	}
	t = A[$1]
	delete A[$1]
	A[$3] = t
	next
}

$2 == "free" {
	if (!($1 in A)) {
		problem($1 " not yet allocated; freed at " NR)
		next
	}
	delete A[$1]
	next
}

{ problem("unrecognized line " $0 " at " NR) }

END {
	for (i in A)
		problem("leaked " A[i] " at " i)
	close("/dev/stderr")
	if (hasProblems)
		exit 1
}

function problem(s) {
	print s > "/dev/stderr"
	hasProblems = 1
}

function type(		s, i) {
	s = $3
	for (i = 4; i <= NF; i++)
		s = s " " $i
	return s
}

error: pathspec 'new/leaks.awk' did not match any file(s) known to git


Create zad9.awk

Create zad9.awk

#Przepisz z pliku wejściowego liczby.txt linie, które są liczbami rzeczywistymi.

#BEGIN {cyfry="^[0-9]+$" }; $0 ~cyfry

{printf "%f\n", $1}

error: pathspec 'AWK/zad9.awk' did not match any file(s) known to git


bin/cat-press.awk: new file

bin/cat-press.awk: new file

#!/usr/bin/awk -f

function flush() {
    if (n > 0) {
	if (n > 1)
	    printf("<%u times> ", n);
	print mem
	mem = ""
	n = 0
    }
}

BEGIN { mem = n = 0 }

$0 == mem { ++n; next }

{
    flush()
    mem = $0
    n = 1
}

END { flush() }

error: pathspec 'bin/cat-press.awk' did not match any file(s) known to git


Added src_from_args

Added src_from_args

/^\(<FSItem/{s=index($0,"/mnt/a"); e=index($0,">, <FSItem "); l=e-s; printf("%s\n",substr($0,s,l))}

error: pathspec 'test/src_from_args.awk' did not match any file(s) known to git


fixed awk missmatch of publish category

fixed awk missmatch of publish category

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/orbifx/yamado.git/'


add Help (initial)

add Help (initial)

#!/usr/bin/gawk -f

# Return version as a string.
function getVersion() {
    return Name " " Version
}

# Compare indices.
# Used by: getCodeReference()
function codeComparison(i1, v1, i2, v2) {
    return i1 > i2
}

# Compare "name" values.
# Used by: getCodeReference()
function nameComparison(i1, v1, i2, v2) {
    return "name" in v1 ? v1["name"] > v2["name"] : 0
}

# Compare "relevance" values.
# Used by: getTranslation()
function relevanceComparison(i1, v1, i2, v2) {
    return "relevance" in v1 ? v1["relevance"] < v2["relevance"] : 0
}

# Return code reference list as a string.
# Parameters:
#     sortBy = "name" or "code"
function getCodeReference(sortBy,    i, r, saveSortedIn) {
    r = sprintf("%10s  %-20s %s\n", "[code]", "[language]", "[endonym]")
    r = r "    ─────────────────────────────────────────────" "\n"
    saveSortedIn = PROCINFO["sorted_in"]
    PROCINFO["sorted_in"] = sortBy "Comparison"
    for (i in Locale)
        r = r sprintf(AnsiCode["bold"] "%10s" AnsiCode["no bold"] "  %-20s %s\n", i, Locale[i]["name"], Locale[i]["display"], i)
    r = r "    ─────────────────────────────────────────────"
    PROCINFO["sorted_in"] = saveSortedIn
    return r
}

# Return code reference table as a string.
# Parameters:
#     displayName = "endonym" or "name"
function getCodeReferenceTable(displayName) {
    if (displayName == "name")
        return "┌─────────────────────────────┬──────────────────────┬─────────────────┐\n" \
            "│ " Locale["af"]["name"] "           - " AnsiCode["bold"] "af" AnsiCode["no bold"] "    │ " Locale["el"]["name"] "          - " AnsiCode["bold"] "el" AnsiCode["no bold"] "  │ " Locale["mn"]["name"] "  - " AnsiCode["bold"] "mn" AnsiCode["no bold"] " │\n" \
            "│ " Locale["sq"]["name"] "            - " AnsiCode["bold"] "sq" AnsiCode["no bold"] "    │ " Locale["gu"]["name"] "       - " AnsiCode["bold"] "gu" AnsiCode["no bold"] "  │ " Locale["ne"]["name"] "     - " AnsiCode["bold"] "ne" AnsiCode["no bold"] " │\n" \
            "│ " Locale["ar"]["name"] "              - " AnsiCode["bold"] "ar" AnsiCode["no bold"] "    │ " Locale["ht"]["name"] " - " AnsiCode["bold"] "ht" AnsiCode["no bold"] "  │ " Locale["no"]["name"] "  - " AnsiCode["bold"] "no" AnsiCode["no bold"] " │\n" \
            "│ " Locale["hy"]["name"] "            - " AnsiCode["bold"] "hy" AnsiCode["no bold"] "    │ " Locale["ha"]["name"] "          - " AnsiCode["bold"] "ha" AnsiCode["no bold"] "  │ " Locale["fa"]["name"] "    - " AnsiCode["bold"] "fa" AnsiCode["no bold"] " │\n" \
            "│ " Locale["az"]["name"] "         - " AnsiCode["bold"] "az" AnsiCode["no bold"] "    │ " Locale["he"]["name"] "         - " AnsiCode["bold"] "he" AnsiCode["no bold"] "  │ " Locale["pl"]["name"] "     - " AnsiCode["bold"] "pl" AnsiCode["no bold"] " │\n" \
            "│ " Locale["eu"]["name"] "              - " AnsiCode["bold"] "eu" AnsiCode["no bold"] "    │ " Locale["hi"]["name"] "          - " AnsiCode["bold"] "hi" AnsiCode["no bold"] "  │ " Locale["pt"]["name"] " - " AnsiCode["bold"] "pt" AnsiCode["no bold"] " │\n" \
            "│ " Locale["be"]["name"] "          - " AnsiCode["bold"] "be" AnsiCode["no bold"] "    │ " Locale["hmn"]["name"] "          - " AnsiCode["bold"] "hmn" AnsiCode["no bold"] " │ " Locale["pa"]["name"] "    - " AnsiCode["bold"] "pa" AnsiCode["no bold"] " │\n" \
            "│ " Locale["bn"]["name"] "             - " AnsiCode["bold"] "bn" AnsiCode["no bold"] "    │ " Locale["hu"]["name"] "      - " AnsiCode["bold"] "hu" AnsiCode["no bold"] "  │ " Locale["ro"]["name"] "   - " AnsiCode["bold"] "ro" AnsiCode["no bold"] " │\n" \
            "│ " Locale["bs"]["name"] "             - " AnsiCode["bold"] "bs" AnsiCode["no bold"] "    │ " Locale["is"]["name"] "      - " AnsiCode["bold"] "is" AnsiCode["no bold"] "  │ " Locale["ru"]["name"] "    - " AnsiCode["bold"] "ru" AnsiCode["no bold"] " │\n" \
            "│ " Locale["bg"]["name"] "           - " AnsiCode["bold"] "bg" AnsiCode["no bold"] "    │ " Locale["ig"]["name"] "           - " AnsiCode["bold"] "ig" AnsiCode["no bold"] "  │ " Locale["sr"]["name"] "    - " AnsiCode["bold"] "sr" AnsiCode["no bold"] " │\n" \
            "│ " Locale["ca"]["name"] "             - " AnsiCode["bold"] "ca" AnsiCode["no bold"] "    │ " Locale["id"]["name"] "     - " AnsiCode["bold"] "id" AnsiCode["no bold"] "  │ " Locale["sk"]["name"] "     - " AnsiCode["bold"] "sk" AnsiCode["no bold"] " │\n" \
            "│ " Locale["ceb"]["name"] "             - " AnsiCode["bold"] "ceb" AnsiCode["no bold"] "   │ " Locale["ga"]["name"] "          - " AnsiCode["bold"] "ga" AnsiCode["no bold"] "  │ " Locale["sl"]["name"] "  - " AnsiCode["bold"] "sl" AnsiCode["no bold"] " │\n" \
            "│ " Locale["zh-CN"]["name"] "  - " AnsiCode["bold"] "zh-CN" AnsiCode["no bold"] " │ " Locale["it"]["name"] "        - " AnsiCode["bold"] "it" AnsiCode["no bold"] "  │ " Locale["so"]["name"] "     - " AnsiCode["bold"] "so" AnsiCode["no bold"] " │\n" \
            "│ " Locale["zh-TW"]["name"] " - " AnsiCode["bold"] "zh-TW" AnsiCode["no bold"] " │ " Locale["ja"]["name"] "       - " AnsiCode["bold"] "ja" AnsiCode["no bold"] "  │ " Locale["es"]["name"] "    - " AnsiCode["bold"] "es" AnsiCode["no bold"] " │\n" \
            "│ " Locale["hr"]["name"] "            - " AnsiCode["bold"] "hr" AnsiCode["no bold"] "    │ " Locale["jv"]["name"] "       - " AnsiCode["bold"] "jv" AnsiCode["no bold"] "  │ " Locale["sw"]["name"] "    - " AnsiCode["bold"] "sw" AnsiCode["no bold"] " │\n" \
            "│ " Locale["cs"]["name"] "               - " AnsiCode["bold"] "cs" AnsiCode["no bold"] "    │ " Locale["kn"]["name"] "        - " AnsiCode["bold"] "kn" AnsiCode["no bold"] "  │ " Locale["sv"]["name"] "    - " AnsiCode["bold"] "sv" AnsiCode["no bold"] " │\n" \
            "│ " Locale["da"]["name"] "              - " AnsiCode["bold"] "da" AnsiCode["no bold"] "    │ " Locale["km"]["name"] "          - " AnsiCode["bold"] "km" AnsiCode["no bold"] "  │ " Locale["ta"]["name"] "      - " AnsiCode["bold"] "ta" AnsiCode["no bold"] " │\n" \
            "│ " Locale["nl"]["name"] "               - " AnsiCode["bold"] "nl" AnsiCode["no bold"] "    │ " Locale["ko"]["name"] "         - " AnsiCode["bold"] "ko" AnsiCode["no bold"] "  │ " Locale["te"]["name"] "     - " AnsiCode["bold"] "te" AnsiCode["no bold"] " │\n" \
            "│ " Locale["en"]["name"] "             - " AnsiCode["bold"] "en" AnsiCode["no bold"] "    │ " Locale["lo"]["name"] "            - " AnsiCode["bold"] "lo" AnsiCode["no bold"] "  │ " Locale["th"]["name"] "       - " AnsiCode["bold"] "th" AnsiCode["no bold"] " │\n" \
            "│ " Locale["eo"]["name"] "           - " AnsiCode["bold"] "eo" AnsiCode["no bold"] "    │ " Locale["la"]["name"] "          - " AnsiCode["bold"] "la" AnsiCode["no bold"] "  │ " Locale["tr"]["name"] "    - " AnsiCode["bold"] "tr" AnsiCode["no bold"] " │\n" \
            "│ " Locale["et"]["name"] "            - " AnsiCode["bold"] "et" AnsiCode["no bold"] "    │ " Locale["lv"]["name"] "        - " AnsiCode["bold"] "lv" AnsiCode["no bold"] "  │ " Locale["uk"]["name"] "  - " AnsiCode["bold"] "uk" AnsiCode["no bold"] " │\n" \
            "│ " Locale["tl"]["name"] "            - " AnsiCode["bold"] "tl" AnsiCode["no bold"] "    │ " Locale["lt"]["name"] "     - " AnsiCode["bold"] "lt" AnsiCode["no bold"] "  │ " Locale["ur"]["name"] "       - " AnsiCode["bold"] "ur" AnsiCode["no bold"] " │\n" \
            "│ " Locale["fi"]["name"] "             - " AnsiCode["bold"] "fi" AnsiCode["no bold"] "    │ " Locale["mk"]["name"] "     - " AnsiCode["bold"] "mk" AnsiCode["no bold"] "  │ " Locale["vi"]["name"] " - " AnsiCode["bold"] "vi" AnsiCode["no bold"] " │\n" \
            "│ " Locale["fr"]["name"] "              - " AnsiCode["bold"] "fr" AnsiCode["no bold"] "    │ " Locale["ms"]["name"] "          - " AnsiCode["bold"] "ms" AnsiCode["no bold"] "  │ " Locale["cy"]["name"] "      - " AnsiCode["bold"] "cy" AnsiCode["no bold"] " │\n" \
            "│ " Locale["gl"]["name"] "            - " AnsiCode["bold"] "gl" AnsiCode["no bold"] "    │ " Locale["mt"]["name"] "        - " AnsiCode["bold"] "mt" AnsiCode["no bold"] "  │ " Locale["yi"]["name"] "    - " AnsiCode["bold"] "yi" AnsiCode["no bold"] " │\n" \
            "│ " Locale["ka"]["name"] "            - " AnsiCode["bold"] "ka" AnsiCode["no bold"] "    │ " Locale["mi"]["name"] "          - " AnsiCode["bold"] "mi" AnsiCode["no bold"] "  │ " Locale["yo"]["name"] "     - " AnsiCode["bold"] "yo" AnsiCode["no bold"] " │\n" \
            "│ " Locale["de"]["name"] "              - " AnsiCode["bold"] "de" AnsiCode["no bold"] "    │ " Locale["mr"]["name"] "        - " AnsiCode["bold"] "mr" AnsiCode["no bold"] "  │ " Locale["zu"]["name"] "       - " AnsiCode["bold"] "zu" AnsiCode["no bold"] " │\n" \
            "└─────────────────────────────┴──────────────────────┴─────────────────┘"
    else
        return "┌────────────────────┬────────────────────────┬─────────────────────┐\n" \
            "│ " Locale["af"]["display"] "    - " AnsiCode["bold"] "af" AnsiCode["no bold"] "  │ " Locale["hi"]["display"] "            - " AnsiCode["bold"] "hi" AnsiCode["no bold"] "  │ " Locale["nl"]["display"] "  - " AnsiCode["bold"] "nl" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["ar"]["display"] "      - " AnsiCode["bold"] "ar" AnsiCode["no bold"] "  │ " Locale["hmn"]["display"] "            - " AnsiCode["bold"] "hmn" AnsiCode["no bold"] " │ " Locale["no"]["display"] "       - " AnsiCode["bold"] "no" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["az"]["display"] " - " AnsiCode["bold"] "az" AnsiCode["no bold"] "  │ " Locale["hr"]["display"] "         - " AnsiCode["bold"] "hr" AnsiCode["no bold"] "  │ " Locale["pa"]["display"] "       - " AnsiCode["bold"] "pa" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["be"]["display"] "   - " AnsiCode["bold"] "be" AnsiCode["no bold"] "  │ " Locale["ht"]["display"] "   - " AnsiCode["bold"] "ht" AnsiCode["no bold"] "  │ " Locale["pl"]["display"] "      - " AnsiCode["bold"] "pl" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["bg"]["display"] "    - " AnsiCode["bold"] "bg" AnsiCode["no bold"] "  │ " Locale["hu"]["display"] "           - " AnsiCode["bold"] "hu" AnsiCode["no bold"] "  │ " Locale["pt"]["display"] "   - " AnsiCode["bold"] "pt" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["bn"]["display"] "        - " AnsiCode["bold"] "bn" AnsiCode["no bold"] "  │ " Locale["hy"]["display"] "          - " AnsiCode["bold"] "hy" AnsiCode["no bold"] "  │ " Locale["ro"]["display"] "      - " AnsiCode["bold"] "ro" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["bs"]["display"] "     - " AnsiCode["bold"] "bs" AnsiCode["no bold"] "  │ " Locale["id"]["display"] " - " AnsiCode["bold"] "id" AnsiCode["no bold"] "  │ " Locale["ru"]["display"] "     - " AnsiCode["bold"] "ru" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["ca"]["display"] "       - " AnsiCode["bold"] "ca" AnsiCode["no bold"] "  │ " Locale["ig"]["display"] "             - " AnsiCode["bold"] "ig" AnsiCode["no bold"] "  │ " Locale["sk"]["display"] "  - " AnsiCode["bold"] "sk" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["ceb"]["display"] "      - " AnsiCode["bold"] "ceb" AnsiCode["no bold"] " │ " Locale["is"]["display"] "         - " AnsiCode["bold"] "is" AnsiCode["no bold"] "  │ " Locale["sl"]["display"] " - " AnsiCode["bold"] "sl" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["cs"]["display"] "      - " AnsiCode["bold"] "cs" AnsiCode["no bold"] "  │ " Locale["it"]["display"] "         - " AnsiCode["bold"] "it" AnsiCode["no bold"] "  │ " Locale["so"]["display"] "    - " AnsiCode["bold"] "so" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["cy"]["display"] "      - " AnsiCode["bold"] "cy" AnsiCode["no bold"] "  │ " Locale["ja"]["display"] "           - " AnsiCode["bold"] "ja" AnsiCode["no bold"] "  │ " Locale["sq"]["display"] "       - " AnsiCode["bold"] "sq" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["da"]["display"] "        - " AnsiCode["bold"] "da" AnsiCode["no bold"] "  │ " Locale["jv"]["display"] "        - " AnsiCode["bold"] "jv" AnsiCode["no bold"] "  │ " Locale["sr"]["display"] "      - " AnsiCode["bold"] "sr" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["de"]["display"] "      - " AnsiCode["bold"] "de" AnsiCode["no bold"] "  │ " Locale["ka"]["display"] "          - " AnsiCode["bold"] "ka" AnsiCode["no bold"] "  │ " Locale["sv"]["display"] "     - " AnsiCode["bold"] "sv" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["el"]["display"] "     - " AnsiCode["bold"] "el" AnsiCode["no bold"] "  │ " Locale["km"]["display"] "         - " AnsiCode["bold"] "km" AnsiCode["no bold"] "  │ " Locale["sw"]["display"] "   - " AnsiCode["bold"] "sw" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["en"]["display"] "      - " AnsiCode["bold"] "en" AnsiCode["no bold"] "  │ " Locale["kn"]["display"] "             - " AnsiCode["bold"] "kn" AnsiCode["no bold"] "  │ " Locale["ta"]["display"] "        - " AnsiCode["bold"] "ta" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["eo"]["display"] "    - " AnsiCode["bold"] "eo" AnsiCode["no bold"] "  │ " Locale["ko"]["display"] "           - " AnsiCode["bold"] "ko" AnsiCode["no bold"] "  │ " Locale["te"]["display"] "       - " AnsiCode["bold"] "te" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["es"]["display"] "      - " AnsiCode["bold"] "es" AnsiCode["no bold"] "  │ " Locale["la"]["display"] "           - " AnsiCode["bold"] "la" AnsiCode["no bold"] "  │ " Locale["th"]["display"] "         - " AnsiCode["bold"] "th" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["et"]["display"] "        - " AnsiCode["bold"] "et" AnsiCode["no bold"] "  │ " Locale["lo"]["display"] "              - " AnsiCode["bold"] "lo" AnsiCode["no bold"] "  │ " Locale["tl"]["display"] "     - " AnsiCode["bold"] "tl" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["eu"]["display"] "      - " AnsiCode["bold"] "eu" AnsiCode["no bold"] "  │ " Locale["lt"]["display"] "         - " AnsiCode["bold"] "lt" AnsiCode["no bold"] "  │ " Locale["tr"]["display"] "      - " AnsiCode["bold"] "tr" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["fa"]["display"] "        - " AnsiCode["bold"] "fa" AnsiCode["no bold"] "  │ " Locale["lv"]["display"] "         - " AnsiCode["bold"] "lv" AnsiCode["no bold"] "  │ " Locale["uk"]["display"] "  - " AnsiCode["bold"] "uk" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["fi"]["display"] "        - " AnsiCode["bold"] "fi" AnsiCode["no bold"] "  │ " Locale["mi"]["display"] "            - " AnsiCode["bold"] "mi" AnsiCode["no bold"] "  │ " Locale["ur"]["display"] "        - " AnsiCode["bold"] "ur" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["fr"]["display"] "     - " AnsiCode["bold"] "fr" AnsiCode["no bold"] "  │ " Locale["mk"]["display"] "       - " AnsiCode["bold"] "mk" AnsiCode["no bold"] "  │ " Locale["vi"]["display"] "  - " AnsiCode["bold"] "vi" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["ga"]["display"] "      - " AnsiCode["bold"] "ga" AnsiCode["no bold"] "  │ " Locale["mn"]["display"] "           - " AnsiCode["bold"] "mn" AnsiCode["no bold"] "  │ " Locale["yi"]["display"] "       - " AnsiCode["bold"] "yi" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["gl"]["display"] "       - " AnsiCode["bold"] "gl" AnsiCode["no bold"] "  │ " Locale["mr"]["display"] "            - " AnsiCode["bold"] "mr" AnsiCode["no bold"] "  │ " Locale["yo"]["display"] "      - " AnsiCode["bold"] "yo" AnsiCode["no bold"] "    │\n" \
            "│ " Locale["gu"]["display"] "       - " AnsiCode["bold"] "gu" AnsiCode["no bold"] "  │ " Locale["ms"]["display"] "    - " AnsiCode["bold"] "ms" AnsiCode["no bold"] "  │ " Locale["zh-CN"]["display"] "    - " AnsiCode["bold"] "zh-CN" AnsiCode["no bold"] " │\n" \
            "│ " Locale["ha"]["display"] "        - " AnsiCode["bold"] "ha" AnsiCode["no bold"] "  │ " Locale["mt"]["display"] "            - " AnsiCode["bold"] "mt" AnsiCode["no bold"] "  │ " Locale["zh-TW"]["display"] "    - " AnsiCode["bold"] "zh-TW" AnsiCode["no bold"] " │\n" \
            "│ " Locale["he"]["display"] "        - " AnsiCode["bold"] "he" AnsiCode["no bold"] "  │ " Locale["ne"]["display"] "            - " AnsiCode["bold"] "ne" AnsiCode["no bold"] "  │ " Locale["zu"]["display"] "     - " AnsiCode["bold"] "zu" AnsiCode["no bold"] "    │\n" \
            "└────────────────────┴────────────────────────┴─────────────────────┘"
}

error: pathspec 'lib/Help.awk' did not match any file(s) known to git


AWK script to create a list of source files from `make` output.

For `./configure` & `make` builds. Not for CMake builds. Can be used to
generate source file lists to be used in `CMakeLists.txt`, though.

Works at least with `gawk`.

Usage:

`.configure`
`make >foo.txt 2>&1`
`generate_source_list_from_make_output.awk foo.txt`

	new file:   code/awk/generate_source_list_from_make_output.awk

#!/usr/bin/awk -f
BEGIN{
    # This program generates source list to be used in `CMakeLists.txt`
    # or elsewhere using `foo.txt` produced by `make >foo.txt 2>&1` as input.

    current_dir = "";
    new_filename = "";
    current_filename = "";
    entering_directory_regex = "Entering directory '";
    cpp_regex = "\\<[a-zA-Z0-9_-]+\\.cpp\\>";
    c_regex = "\\<[a-zA-Z0-9_-]+\\.c\\>";
} # BEGIN

function get_filename()
{
    # OK, there's a `.cpp` file on this line.
    cpp_filename = substr($0, RSTART, RLENGTH);
    new_filename = current_dir "/" cpp_filename;

    if (new_filename != current_filename)
    {
        current_filename = new_filename;

        # print the filename.
        print current_filename;

        # find out if there's a matching `*.h` header file too.
        header_filename = gensub(/(^.*\.)c(|pp)$/, "\\1h", "g", current_filename);

        if (system("test -f " header_filename))
        {
            # header exists, so print its filename too!
            print header_filename;
        }
    }
}
{
    entering_directory_match_index = match($0, entering_directory_regex);
    cpp_match_index = match($0, cpp_regex);
    c_match_index = match($0, c_regex);

    if (entering_directory_match_index > 0)
    {
        # OK, we are entering a new directory on this line.
        junk_part_length = entering_directory_match_index + length(entering_directory_regex);

        # read current dir.
        current_dir = substr($0, junk_part_length, length($0) - junk_part_length);
    }
    else if (cpp_match_index > 0)
    {
        match($0, cpp_regex); # update `RSTART` & `RLENGTH`.
        get_filename();
    }
    else if (c_match_index > 0)
    {
        match($0, c_regex); # update `RSTART` & `RLENGTH`.
        get_filename();
    }
}

error: pathspec 'code/awk/generate_source_list_from_make_output.awk' did not match any file(s) known to git


Add script to process new scrapes

Add script to process new scrapes

# Print the processed "Episode" lines from a WebScraper csv file saved in tsv format

# Field numbers for movies
#    1 web-scraper-order  2 web-scraper-start-url  3 Program_Title     4 Year    5 Duration
#    6 Duration           7 Rating                 8 Description

# Field numbers for shows
#    1 web-scraper-order  2 web-scraper-start-url  3 SsnURL     4 SsnURL-href    5 URL
#    6 Program_Title      7 Episode_Title          8 Year       9 Duration      10 Rating
#   11 Description

BEGIN {
    FS="\t"
    # print "Sortkey\tTitle\tSeasons\tEpisodes\tDuration\tYear(s)\tRating\tDescription"
}

{
    for ( i = 1; i <= NF; i++ ) {
        if ($i == "null")
            $i = ""
    }
}

/\/us\/movie\// {
    URL = $2
    showTitle = $3
    NumSeasons = 1
    NumEpisodes = 1
    Year = $4
    Duration = $5
    Rating = $6
    Description = $7

    # Extract sortkey from URL
    nflds = split (URL,fld,"_")
    if (URL ~ /_[[:digit:]]*$/) {
        sortkey = sprintf ("M%05d", fld[nflds])
    } else {
        sortkey = "XXXX"
    }

    # Convert duration from minutes to HMS
    sub( / min/,"",Duration)
    secs = 0
    mins = Duration % 60
    hrs = int(Duration / 60)
    HMS = sprintf ("%02d:%02d:%02d", hrs, mins, secs)
    if (HMS == "00:00:00")
        HMS = ""

    # Titles starting with "The" should not sort based on "The"
    if (match (showTitle, /^The /))
        showTitle = substr(showTitle, 5) ", The"

    savedLine = sprintf \
        ("%s (1) %s\t=HYPERLINK(\"%s\";\"%s\"\)\t%s\t%s\t%s\t%s\t%s\t%s",\
         showTitle, sortkey, URL, showTitle, NumSeasons, NumEpisodes, HMS, Year,\
         Rating, Description)

    # Make sure line doesn't start with a single quote so it sorts correctly in Open Office
    sub (/^'/,"",savedLine)

    print savedLine
}

/\/us\/episode\// {
    URL = $5
    showTitle = $6
    episodeTitle = $7
    Years = $8
    Duration = $9
    Rating = $10
    Description = $11

    # Extract sortkey from URL
    nflds = split (URL,fld,"_")
    if (URL ~ /_S[[:digit:]]*_E[[:digit:]]*_[[:digit:]]*$/) {
        seasonNumber = substr(fld[nflds-2], 2)
        episodeNumber = substr(fld[nflds-1], 2)
        sortkey = sprintf ("S%02dE%02d", seasonNumber, episodeNumber)
    } else {
        sortkey = sprintf ("E%05d", fld[nflds])
    }

    # Get rid of redundant "Series #" or "Series #" from episodeTitle
    if (match (episodeTitle, /^Season [[:digit:]]*, |^Series [[:digit:]]*, /))
        episodeTitle = substr(episodeTitle,RLENGTH+1)

    # Convert duration from minutes to HMS
    sub( / min/,"",Duration)
    secs = 0
    mins = Duration % 60
    hrs = int(Duration / 60)
    HMS = sprintf ("%02d:%02d:%02d", hrs, mins, secs)
    if (HMS == "00:00:00")
        HMS = ""

    # Titles starting with "The" should not sort based on "The"
    if (match (showTitle, /^The /))
        showTitle = substr(showTitle, 5) ", The"

    savedLine = sprintf \
        ("%s (2) %s %s\t=HYPERLINK(\"https://www.britbox.com%s\";\"%s, %s, %s\"\)\t\t\t%s\t%s\t%s\t%s",\
         showTitle, Years, sortkey, URL, showTitle, sortkey, episodeTitle, HMS, Years, \
         Rating, Description)

    # Make sure line doesn't start with a single quote so it sorts correctly in Open Office
    sub (/^'/,"",savedLine)

    print savedLine
}

error: pathspec 'getBritBoxShowsFrom-webscraper.awk' did not match any file(s) known to git


arr_push(xr, dom($1) FS $1)

arr_push(xr, dom($1) FS $1)

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/svnpenn/sage.git/'


cutter for the interesting part of a twiki page

interesting && /^<div\ class="twikiContentFooter"/ {
    interesting = 0
    next
}

/^<h1>/ {
     interesting = 1
}

interesting {
    gsub(/<h[1-9]>/, "\n&\n")
    gsub(/<\/h[1-9]>/, "\n&\n")
    print
    next
}

error: pathspec 'tools/twiki.awk' did not match any file(s) known to git


add CFI generation script for x86_64

add CFI generation script for x86_64

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/chardi/musl.git/'


2008-03-24  Martin Sebor  <sebor@roguewave.com>

	* bin/xcomp.awk (print_section): Consistently prepended "../" to the
	log file name since build logs are stored in the parent directory of
	the one that contains the cross-build results.

git-svn-id: 8ce9432b95a2a271c6c279131eb1bb968a8ee7fb@640489 13f79535-47bb-0310-9956-ffa450edef68

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/pathscale/stdcxx.git/'


Add toloka-gold-isas.awk

Add toloka-gold-isas.awk

#!/usr/bin/awk -f
BEGIN {
    FS = OFS = "\t";
}
FNR == 1 {
    for (i=1; i<=NF; i++) ix[$i] = i;
    next;
}
tolower($ix["OUTPUT:judgement"]) == "true" {
    for (i = 1; i <= split($ix["INPUT:hypernym"], hypernyms, ", "); i++) {
        print $ix["INPUT:hyponym"], hypernyms[i];
    }
}

error: pathspec 'misc/toloka-gold-isas.awk' did not match any file(s) known to git


fix formatting

fix formatting

git-svn-id: 193148810cf65385f3a195dbc9a8b504846da3a2@4170 ec53bebd-3082-4978-b11e-865c3cabbd6b

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/madscientist159/heimdal.git/'


add count_overheat.awk

add count_overheat.awk

error: pathspec 'tool.imbh/count_overheat.awk' did not match any file(s) known to git


INTEGRATION: CWS macosxmapfiles (1.1.2); FILE ADDED 2007/01/26 19:10:57 pjanik 1.1.2.4: Fix whitespacing. 2007/01/24 06:57:37 tra 1.1.2.3: #i69351# general cleanup and better documentation 2007/01/21 13:38:43 tra 1.1.2.2: #i69351#more flexibility in handling map files 2007/01/11 08:36:10 tra 1.1.2.1: #69351#

#*************************************************************************
#
#   OpenOffice.org - a multi-platform office productivity suite
#
#   $RCSfile: unxmap-to-macosx-explist.awk,v $
#
#   $Revision: 1.2 $
#
#   last change: $Author: rt $ $Date: 2007-01-31 08:42:05 $
#
#   The Contents of this file are made available subject to
#   the terms of GNU Lesser General Public License Version 2.1.
#
#
#     GNU Lesser General Public License Version 2.1
#     =============================================
#     Copyright 2005 by Sun Microsystems, Inc.
#     901 San Antonio Road, Palo Alto, CA 94303, USA
#
#     This library is free software; you can redistribute it and/or
#     modify it under the terms of the GNU Lesser General Public
#     License version 2.1, as published by the Free Software Foundation.
#
#     This library is distributed in the hope that it will be useful,
#     but WITHOUT ANY WARRANTY; without even the implied warranty of
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#     Lesser General Public License for more details.
#
#     You should have received a copy of the GNU Lesser General Public
#     License along with this library; if not, write to the Free Software
#     Foundation, Inc., 59 Temple Place, Suite 330, Boston,
#     MA  02111-1307  USA
#
#*************************************************************************

# Generate an exported symbols list out of a map file (as use on Linux/Solaris) in order to
# build shared libraries on Mac OS X
#
# The below code fails may fail with 'perverted' mapfiles (using a strange line layout etc.)

# Skip 'SECTION_NAME {' lines
/^[\t ]*.*[\t ]*\{/ { next }

# Skip 'global:' or 'local:' lines
/global:/ || /local:/ { next }

# Skip '*;' lines
/^[\t ]*\*;[\t ]*/ { next }

# Skip section end '}?;' lines
/^[\t ]*\}[\t ]*.*[;]*/ { next }

# Skip comment or empty lines
/^[\t ]*#.*/ || /^[\t ]*$/ || /^$/ { next }

# Echo all lines containing symbol names and prefix them with '_'
# because symbols on Mac OS X start always with '__'
{
    # There may appear multiple symbols in one line
    # e.g. "sym1; sym2; # and finally a comment"
    # take this into account
    for (i = 1; i <= NF ; i++) {
	if ($i !~ /^[\t ]*#.*/) { # as long as the current field doesn't start with '#'
	    gsub(/[\t ;]/, "", $i) # Remove leading spaces and trailing ';'
	    printf("_%s\n",$i)
	}
	else { # ignore everything after a '#' (comment) sign
	    break
	}
    }
}

error: pathspec 'solenv/bin/unxmap-to-macosx-explist.awk' did not match any file(s) known to git


add awk script to convert query logs into CSV file

function outputQuery(query, corpus, runtime)
{
#	print "--------------------------------"
#	print "Query: " query
#	print "Runtime: " runtime " ms"
#	print "Corpus: " corpus
#	print "--------------------------------"
	print corpus "\t" gensub(/\t/, " ", "g", query) "\t" runtime
}

BEGIN {
	query=""
	print "corpora\tquery\ttime (in ms)"
}

# capture a line with complete input in one line
/^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9](.*)function: COUNT, query: (.*), corpus: \[([^\]]+)\], runtime: [0-9]+ ms$/ {
	where = match($0, /^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9](.*)function: COUNT, query: (.*), corpus: \[([^\]]+)\], runtime: ([0-9]+) ms$/, ary)
	if(where)
	{
		query= ""
		outputQuery(ary[2], ary[3], ary[4])
		next
	}
}

# capture incomplete
/^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9](.*)function: COUNT, query: (.*)$/ {
	where = match($0, /^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9](.*)function: COUNT, query: (.*)$/, ary)
	if(where)
	{
		query= ary[2]
		next
	}
}

# capture end of incomplete query
/corpus: \[([^\]]+)\], runtime: ([0-9]+) ms$/ {

	if(query != "" && match($0, /(.+), corpus: \[([^\]]+)\], runtime: ([0-9]+) ms$/,ary))
	{
		outputQuery(query " " ary[1], ary[2], ary[3])
	}
	query = ""
	next
}

{
	if(query != "")
	{
		# append the current line
		query = query " " $0
	}
}

error: pathspec 'Misc/parsequerylog/parseCount.awk' did not match any file(s) known to git


bugs highlighted by mawk, closes #52

bugs highlighted by mawk, closes #52


added awk

added awk

error: pathspec 'awk/beats.awk' did not match any file(s) known to git


2008-03-14  Martin Sebor  <sebor@roguewave.com>

	* bin/xcomp.awk (print_timingstable): Highlighted totals in bold.

git-svn-id: 8ce9432b95a2a271c6c279131eb1bb968a8ee7fb@637295 13f79535-47bb-0310-9956-ffa450edef68


pull in <errno.h>

pull in <errno.h>


script parsing TWI (I2C) sessions from digital scope

#!/usr/bin/env awk -f
# Parse mega bytes csv to human readable command-response sequences.
# We get this CSV from digital scope.

# Example input:
# Time(seconds),Bus Name,Signal Name,Data
# 3.649978000,I2C 3,Digital 3,S - Start
# 3.649995000,I2C 3,Digital 3,F0 Write
# 3.650073000,I2C 3,Digital 3,ACK
# 3.650089000,I2C 3,Digital 3,05

BEGIN {
  FS = ",";
  lastTime = 0; sid = 0;
  mlen = 0; rlen = 0;
  lastByte = 0;
  cmdByte = 0;
  data = ""; byte = 0;
  line = ""; sdesc = "";
}

function parseTime(s) {
  isms = sub("ms", "", s) > 0;
  isrel = sub("+", "", s) > 0;
  v = strtonum(s);
  if (isms) { v /= 1000 }
  if (isrel) { v += lastTime }
  return v
}
function low(a) { return and(a, 0xff) }
function printLine() {
  if (line) {
    print line "\t" commandName() "\t" sdesc;
  }
  line = ""; sdesc = "";
}

/^Time/ { next }
/Error$/ { next }

{
lastByte = byte;
time = parseTime($1);
bus = $2;
data = $4;
byte = strtonum("0x"data);
byteLoHex = sprintf("%02x ", low(byte));

# special processing of first line
if (lastTime == 0) { lastTime = time; addr = parseAddr(byte); }
if (time - lastTime < 0) { lastTime = time ; lastBus = "" ; lastByte = 0; }

if (bus == "MT") {
  if (byte >= 0x100) {
    # begin new VMC command (session)
    printLine();
    mchk = 0;
    mlen = 0;
    sid += 1;
    cmdByte = byte;
    addr = parseAddr(byte);
    sdesc = byteLoHex;

    offset = (time - lastTime) * 1000;
    line = sprintf("%d\t%.1f\t%d\t%s",
      time*1000, offset, sid, deviceName(addr))
  } else {
    if (lastBus == "MR") {
      # VMC ack/nak of peripheral response
      if (byte == 0x00) {
        sdesc = sdesc "-> ACK "
      } else if (byte == 0x55) {
        sdesc = sdesc "-> RET "
      } else if (byte == 0xff) {
        sdesc = sdesc "-> NAK "
      } else {
        sdesc = sdesc sprintf("ERR(%02x!=ACK/RET/NAK)", byte)
      }
    } else {
      sdesc = sdesc byteLoHex;
    }
  }
  mchk = low(mchk + byte);
  lastTime = time;
} else if (bus == "MR") {
  if (lastBus == "MT") {
    rlen = 0;

    mchkb = lastByte;
    mchk = low(mchk + 0x100 - lastByte);
    # skip valid checksum
    sdesc = substr(sdesc, 1, length(sdesc)-3);
    if (mchk != mchkb) {
      sdesc = sdesc sprintf("CHKERR(%02x!=%02x)", mchkb, mchk);
    }
  }
  rlen += 1;
  lastTime = time;
  if (rlen == 1 && byte >= 0x100) {
    # short peripheral response: ACK/NAK
    if (byte == 0x100) {
      sdesc = sdesc "-> ACK ";
    } else if (byte == 0x1ff) {
      sdesc = sdesc "-> NAK ";
    } else {
      sdesc = sdesc sprintf("-> CHKERR(%02x!=ACK/NAK)", byte)
    }
  } else if (rlen == 1 && byte < 0x100) {
    # begin long peripheral response
    rchk = low(byte);
    sdesc = sdesc "-> " byteLoHex;
  } else if (rlen > 1 && byte < 0x100) {
    # long peripheral response continued
    rchk = low(rchk + byte);
    sdesc = sdesc byteLoHex;
  } else if (rlen > 1 && byte >= 0x100) {
    # long peripheral response checksum
    rchkb = low(byte);
    if (rchk != rchkb) {
      sdesc = sdesc sprintf("CHKERR(%02x!=%02x)", rchkb, rchk);
    }
  }
}
}

END { printLine(); }

error: pathspec 'script/i2c-parse.awk' did not match any file(s) known to git


move to a separate file

move to a separate file

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/stuartyeates/rsnz-fellows.git/'


getdirs.awk: restore regexp to original

getdirs.awk: restore regexp to original

Change-Id: I7f9714e1b0e079299c87b036dea8e91ffc701342

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/veritas-shine/minix3-rpi.git/'


reverted experimental mawk

reverted experimental mawk

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/orbifx/yamado.git/'


add start of log sanitiser

add start of log sanitiser

{gsub("\\n", " "); gsub("\"", ""); print >> "./processeddata.tsv"}

error: pathspec 'inst/sampled_log_sanitiser.awk' did not match any file(s) known to git


Create zad7.awk

Create zad7.awk

#Z pliku /etc/passwd wyświetlić nazwy tych użytkowników, którzy nie mają wypełnionego pola numer 5 (dodatkowe informacje o użytkowniku).

BEGIN {FS=":"} $5 =="" {print $1}

error: pathspec 'AWK/zad7.awk' did not match any file(s) known to git


Forgot one file for the last commit

Forgot one file for the last commit

# This awk script parses the output of "lcg-infosites space". It displays columns:
# SE_hostname, available space, used space, total space (in GB), %age of used space
#
# As a reminder, "lcg-infosites space" output is like this:
#    Free     Used Reserved     Free     Used Reserved Tag                    SE
#  Online   Online   Online Nearline Nearline Nearline
#-------------------------------------------------------------------------------
#     1696      467        0        0        0        0 -                      arc.univ.kiev.ua
#
# Usage:
#     lcg-infosites --vo biomed space | awk -f parse-lcg-infosites-space.awk
#
# NOTE: the GLUE specification uses: 1GB = 10^3 MB = 10^6 KB... and not 2^10, 2^20.

BEGIN { avail=0; used=0; }

# Remove two first lines:
/Reserved/ { next; }
/Nearline/ { next; }
/--------/ { next; }

# Return SE hostname, available space, used space, total space (GB), %age of used space
{
   total= $1 + $2;
   if (total==0)
       print $8, $1, $2, total, "n.a";
   else
       print $8, $1, $2, total, int(100*$2/(total)) ;
   avail += $1; used += $2;
}

error: pathspec 'SE/se-space-check-1.0/parse-lcg-infosites-space.awk' did not match any file(s) known to git


Create helper for Netflix activity

Create helper for Netflix activity

# Helper for converting Netflix "viewing activity" into hyperlinks
#
# Since there is no way to paste an embedded hyperlink into a text filei,
# paste the link and the title on two consecutive lines, e.g.
#
# https://www.netflix.com/title/80174814
# Borderliner: Season 1: "Milla’s Future"
# https://www.netflix.com/title/80203122
# Luxury Travel Show: Season 1: "Chiang Mai & Eze"
# https://www.netflix.com/title/80217826
# Kavin Jay: Everybody Calm Down!

/^https:/ {
    link = $0
    if ((getline title) > 0) {
        gsub (/"/,"\"\"",title)
        printf ("=HYPERLINK(\"%s\";\"%s\")\n",link,title)
    }
}

error: pathspec 'getNetflixFrom-ActivityPage.awk' did not match any file(s) known to git


quick and dirty converter of alingmnet files from nexus to fasta f

error: pathspec 'nex2fasta.awk' did not match any file(s) known to git


Add patch for glib <= 2.60

Add patch for glib <= 2.60

error: pathspec 'GLib-2.0-2.60.0.awk' did not match any file(s) known to git


Add AWK

Add AWK

#!/usr/bin/awk -f

BEGIN {
	for (i = 1; i <= 100; i++)
	if(i%15==0)
		print "FizzBuzz";
	else if(i%3==0)
		print "Fizz";
	else if(i%5==0)
		print "Buzz";
	else
		print i
}

error: pathspec 'AWK/FizzBuzz.awk' did not match any file(s) known to git


add calc_ekin.awk

add calc_ekin.awk

error: pathspec 'tool.imbh/calc_ekin.awk' did not match any file(s) known to git


filter as stolen from speedseq

filter as stolen from speedseq

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/marcelm/CAW.git/'


Added awk

Added awk

# awk -f awk.awk
BEGIN { print "Hello World" }

error: pathspec 'awk.awk' did not match any file(s) known to git


add Languages (initial)

add Languages (initial)

#!/usr/bin/gawk -f

# Initialize all supported locales.
# Mostly ISO 639-1 codes, with a few ISO 639-2 codes (alpha-3).
# See: <https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes>
#      <http://www.loc.gov/standards/iso639-2/php/code_list.php>
function initLocale() {

    #1 Afrikaans
    Locale["af"]["name"]       = "Afrikaans"
    Locale["af"]["endonym"]    = "Afrikaans"
    Locale["af"]["message"]    = "Vertalings van %s"

    #2 Albanian
    Locale["sq"]["name"]       = "Albanian"
    Locale["sq"]["endonym"]    = "Shqip"
    Locale["sq"]["message"]    = "Përkthimet e %s"

    #3 Arabic
    Locale["ar"]["name"]       = "Arabic"
    Locale["ar"]["endonym"]    = "العربية"
    Locale["ar"]["message"]    = "ترجمات %s"
    Locale["ar"]["rtl"]        = "true" # RTL language

    #4 Armenian
    Locale["hy"]["name"]       = "Armenian"
    Locale["hy"]["endonym"]    = "Հայերեն"
    Locale["hy"]["message"]    = "%s-ի թարգմանությունները"

    #5 Azerbaijani
    Locale["az"]["name"]       = "Azerbaijani"
    Locale["az"]["endonym"]    = "Azərbaycanca"
    Locale["az"]["message"]    = "%s sözünün tərcüməsi"

    #6 Basque
    Locale["eu"]["name"]       = "Basque"
    Locale["eu"]["endonym"]    = "Euskara"
    Locale["eu"]["message"]    = "%s esapidearen itzulpena"

    #7 Belarusian (Cyrillic alphabet)
    Locale["be"]["name"]       = "Belarusian"
    Locale["be"]["endonym"]    = "беларуская"
    Locale["be"]["message"]    = "Пераклады %s"

    #8 Bengali
    Locale["bn"]["name"]       = "Bengali"
    Locale["bn"]["endonym"]    = "বাংলা"
    Locale["bn"]["message"]    = "%s এর অনুবাদ"

    #9 Bosnian (Latin alphabet)
    Locale["bs"]["name"]       = "Bosnian"
    Locale["bs"]["endonym"]    = "Bosanski"
    Locale["bs"]["message"]    = "Prijevod za: %s"

    #10 Bulgarian
    Locale["bg"]["name"]       = "Bulgarian"
    Locale["bg"]["endonym"]    = "български"
    Locale["bg"]["message"]    = "Преводи на %s"

    #11 Catalan
    Locale["ca"]["name"]       = "Catalan"
    Locale["ca"]["endonym"]    = "Català"
    Locale["ca"]["message"]    = "Traduccions per a %s"

    #12 Cebuano
    Locale["ceb"]["name"]      = "Cebuano"
    Locale["ceb"]["endonym"]   = "Cebuano"
    Locale["ceb"]["message"]   = "%s Mga Paghubad sa PULONG_O_HUGPONG SA PAMULONG"

    #13a Chinese (Simplified)
    Locale["zh-CN"]["name"]    = "Chinese Simplified"
    Locale["zh-CN"]["endonym"] = "简体中文"
    Locale["zh-CN"]["message"] = "%s 的翻译"

    #13b Chinese (Traditional)
    Locale["zh-TW"]["name"]    = "Chinese Traditional"
    Locale["zh-TW"]["endonym"] = "正體中文"
    Locale["zh-TW"]["message"] = "「%s」的翻譯"

    #14 Croatian
    Locale["hr"]["name"]       = "Croatian"
    Locale["hr"]["endonym"]    = "Hrvatski"
    Locale["hr"]["message"]    = "Prijevodi riječi ili izraza %s"

    #15 Czech
    Locale["cs"]["name"]       = "Czech"
    Locale["cs"]["endonym"]    = "Čeština"
    Locale["cs"]["message"]    = "Překlad výrazu %s"

    #16 Danish
    Locale["da"]["name"]       = "Danish"
    Locale["da"]["endonym"]    = "Dansk"
    Locale["da"]["message"]    = "Oversættelser af %s"

    #17 Dutch
    Locale["nl"]["name"]       = "Dutch"
    Locale["nl"]["endonym"]    = "Nederlands"
    Locale["nl"]["message"]    = "Vertalingen van %s"

    #18 English
    Locale["en"]["name"]       = "English"
    Locale["en"]["endonym"]    = "English"
    Locale["en"]["message"]    = "Translations of %s"

    #19 Esperanto
    Locale["eo"]["name"]       = "Esperanto"
    Locale["eo"]["endonym"]    = "Esperanto"
    Locale["eo"]["message"]    = "Tradukoj de %s"

    #20 Estonian
    Locale["et"]["name"]       = "Estonian"
    Locale["et"]["endonym"]    = "Eesti"
    Locale["et"]["message"]    = "Sõna(de) %s tõlked"

    #21 Filipino
    Locale["tl"]["name"]       = "Filipino"
    Locale["tl"]["endonym"]    = "Tagalog"
    Locale["tl"]["message"]    = "Mga pagsasalin ng %s"

    #22 Finnish
    Locale["fi"]["name"]       = "Finnish"
    Locale["fi"]["endonym"]    = "Suomi"
    Locale["fi"]["message"]    = "Käännökset tekstille %s"

    #23 French
    Locale["fr"]["name"]       = "French"
    Locale["fr"]["endonym"]    = "Français"
    Locale["fr"]["message"]    = "Traductions de %s"

    #24 Galician
    Locale["gl"]["name"]       = "Galician"
    Locale["gl"]["endonym"]    = "Galego"
    Locale["gl"]["message"]    = "Traducións de %s"

    #25 Georgian
    Locale["ka"]["name"]       = "Georgian"
    Locale["ka"]["endonym"]    = "ქართული"
    Locale["ka"]["message"]    = "%s-ის თარგმანები"

    #26 German
    Locale["de"]["name"]       = "German"
    Locale["de"]["endonym"]    = "Deutsch"
    Locale["de"]["message"]    = "Übersetzungen für %s"

    #27 Greek
    Locale["el"]["name"]       = "Greek"
    Locale["el"]["endonym"]    = "Ελληνικά"
    Locale["el"]["message"]    = "Μεταφράσεις του %s"

    #28 Gujarati
    Locale["gu"]["name"]       = "Gujarati"
    Locale["gu"]["endonym"]    = "ગુજરાતી"
    Locale["gu"]["message"]    = "%s ના અનુવાદ"

    #29 Haitian Creole
    Locale["ht"]["name"]       = "Haitian Creole"
    Locale["ht"]["endonym"]    = "Kreyòl Ayisyen"
    Locale["ht"]["message"]    = "Tradiksyon %s"

    #30 Hausa (Latin / Boko alphabet)
    Locale["ha"]["name"]       = "Hausa"
    Locale["ha"]["endonym"]    = "Hausa"
    Locale["ha"]["message"]    = "Fassarar %s"

    #31 Hebrew
    Locale["he"]["name"]       = "Hebrew"
    Locale["he"]["endonym"]    = "עִבְרִית"
    Locale["he"]["message"]    = "תרגומים של %s"
    Locale["he"]["rtl"]        = "true" # RTL language

    #32 Hindi
    Locale["hi"]["name"]       = "Hindi"
    Locale["hi"]["endonym"]    = "हिन्दी"
    Locale["hi"]["message"]    = "%s के अनुवाद"

    #33 Hmong
    Locale["hmn"]["name"]      = "Hmong"
    Locale["hmn"]["endonym"]   = "Hmoob"
    Locale["hmn"]["message"]   = "Lus txhais: %s"

    #34 Hungarian
    Locale["hu"]["name"]       = "Hungarian"
    Locale["hu"]["endonym"]    = "Magyar"
    Locale["hu"]["message"]    = "%s fordításai"

    #35 Icelandic
    Locale["is"]["name"]       = "Icelandic"
    Locale["is"]["endonym"]    = "Íslenska"
    Locale["is"]["message"]    = "Þýðingar á %s"

    #36 Igbo
    Locale["ig"]["name"]       = "Igbo"
    Locale["ig"]["endonym"]    = "Igbo"
    Locale["ig"]["message"]    = "Ntụgharị asụsụ nke %s"

    #37 Indonesian
    Locale["id"]["name"]       = "Indonesian"
    Locale["id"]["endonym"]    = "Bahasa Indonesia"
    Locale["id"]["message"]    = "Terjemahan dari %s"

    #38 Irish
    Locale["ga"]["name"]       = "Irish"
    Locale["ga"]["endonym"]    = "Gaeilge"
    Locale["ga"]["message"]    = "Aistriúcháin ar %s"

    #39 Italian
    Locale["it"]["name"]       = "Italian"
    Locale["it"]["endonym"]    = "Italiano"
    Locale["it"]["message"]    = "Traduzioni di %s"

    #40 Japanese
    Locale["ja"]["name"]       = "Japanese"
    Locale["ja"]["endonym"]    = "日本語"
    Locale["ja"]["message"]    = "「%s」の翻訳"

    #41 Javanese (Latin alphabet)
    Locale["jv"]["name"]       = "Javanese"
    Locale["jv"]["endonym"]    = "Basa Jawa"
    Locale["jv"]["message"]    = "Terjemahan"

    #42 Kannada
    Locale["kn"]["name"]       = "Kannada"
    Locale["kn"]["endonym"]    = "ಕನ್ನಡ"
    Locale["kn"]["message"]    = "%s ನ ಅನುವಾದಗಳು"

    #43 Khmer (Central Khmer)
    Locale["km"]["name"]       = "Khmer"
    Locale["km"]["endonym"]    = "ភាសាខ្មែរ"
    Locale["km"]["message"]    = "ការបកប្រែនៃ %s"

    #44 Korean
    Locale["ko"]["name"]       = "Korean"
    Locale["ko"]["endonym"]    = "한국어"
    Locale["ko"]["message"]    = "%s의 번역"

    #45 Lao
    Locale["lo"]["name"]       = "Lao"
    Locale["lo"]["endonym"]    = "ລາວ"
    Locale["lo"]["message"]    = "ການແປພາສາຂອງ %s"

    #46 Latin
    Locale["la"]["name"]       = "Latin"
    Locale["la"]["endonym"]    = "Latina"
    Locale["la"]["message"]    = "Versio de %s"

    #47 Latvian
    Locale["lv"]["name"]       = "Latvian"
    Locale["lv"]["endonym"]    = "Latviešu"
    Locale["lv"]["message"]    = "%s tulkojumi"

    #48 Lithuanian
    Locale["lt"]["name"]       = "Lithuanian"
    Locale["lt"]["endonym"]    = "Lietuvių"
    Locale["lt"]["message"]    = "„%s“ vertimai"

    #49 Macedonian
    Locale["mk"]["name"]       = "Macedonian"
    Locale["mk"]["endonym"]    = "Македонски"
    Locale["mk"]["message"]    = "Преводи на %s"

    #50 Malay
    Locale["ms"]["name"]       = "Malay"
    Locale["ms"]["endonym"]    = "Bahasa Melayu"
    Locale["ms"]["message"]    = "Terjemahan %s"

    #51 Maltese
    Locale["mt"]["name"]       = "Maltese"
    Locale["mt"]["endonym"]    = "Malti"
    Locale["mt"]["message"]    = "Traduzzjonijiet ta' %s"

    #52 Maori
    Locale["mi"]["name"]       = "Maori"
    Locale["mi"]["endonym"]    = "Māori"
    Locale["mi"]["message"]    = "Ngā whakamāoritanga o %s"

    #53 Marathi
    Locale["mr"]["name"]       = "Marathi"
    Locale["mr"]["endonym"]    = "मराठी"
    Locale["mr"]["message"]    = "%s ची भाषांतरे"

    #54 Mongolian (Cyrillic alphabet)
    Locale["mn"]["name"]       = "Mongolian"
    Locale["mn"]["endonym"]    = "Монгол"
    Locale["mn"]["message"]    = "%s-н орчуулга"

    #55 Nepali
    Locale["ne"]["name"]       = "Nepali"
    Locale["ne"]["endonym"]    = "नेपाली"
    Locale["ne"]["message"]    = "%sका अनुवाद"

    #56 Norwegian
    Locale["no"]["name"]       = "Norwegian"
    Locale["no"]["endonym"]    = "Norsk"
    Locale["no"]["message"]    = "Oversettelser av %s"

    #57 Persian
    Locale["fa"]["name"]       = "Persian"
    Locale["fa"]["endonym"]    = "فارسی"
    Locale["fa"]["message"]    = "ترجمه‌های %s"
    Locale["fa"]["rtl"]        = "true" # RTL language

    #58 Punjabi (Brahmic / Gurmukhī alphabet)
    Locale["pa"]["name"]       = "Punjabi"
    Locale["pa"]["endonym"]    = "ਪੰਜਾਬੀ"
    Locale["pa"]["message"]    = "ਦੇ ਅਨੁਵਾਦ%s"

    #59 Polish
    Locale["pl"]["name"]       = "Polish"
    Locale["pl"]["endonym"]    = "Polski"
    Locale["pl"]["message"]    = "Tłumaczenia %s"

    #60 Portuguese
    Locale["pt"]["name"]       = "Portuguese"
    Locale["pt"]["endonym"]    = "Português"
    Locale["pt"]["message"]    = "Traduções de %s"

    #61 Romanian
    Locale["ro"]["name"]       = "Romanian"
    Locale["ro"]["endonym"]    = "Română"
    Locale["ro"]["message"]    = "Traduceri pentru %s"

    #62 Russian
    Locale["ru"]["name"]       = "Russian"
    Locale["ru"]["endonym"]    = "Русский"
    Locale["ru"]["message"]    = "%s: варианты перевода"

    #63 Serbian (Cyrillic alphabet)
    Locale["sr"]["name"]       = "Serbian"
    Locale["sr"]["endonym"]    = "српски"
    Locale["sr"]["message"]    = "Преводи за „%s“"

    #64 Slovak
    Locale["sk"]["name"]       = "Slovak"
    Locale["sk"]["endonym"]    = "Slovenčina"
    Locale["sk"]["message"]    = "Preklady výrazu: %s"

    #65 Slovenian
    Locale["sl"]["name"]       = "Slovenian"
    Locale["sl"]["endonym"]    = "Slovenščina"
    Locale["sl"]["message"]    = "Prevodi za %s"

    #66 Somali
    Locale["so"]["name"]       = "Somali"
    Locale["so"]["endonym"]    = "Soomaali"
    Locale["so"]["message"]    = "Turjumaada %s"

    #67 Spanish
    Locale["es"]["name"]       = "Spanish"
    Locale["es"]["endonym"]    = "Español"
    Locale["es"]["message"]    = "Traducciones de %s"

    #68 Swahili
    Locale["sw"]["name"]       = "Swahili"
    Locale["sw"]["endonym"]    = "Kiswahili"
    Locale["sw"]["message"]    = "Tafsiri ya %s"

    #69 Swedish
    Locale["sv"]["name"]       = "Swedish"
    Locale["sv"]["endonym"]    = "Svenska"
    Locale["sv"]["message"]    = "Översättningar av %s"

    #70 Tamil
    Locale["ta"]["name"]       = "Tamil"
    Locale["ta"]["endonym"]    = "தமிழ்"
    Locale["ta"]["message"]    = "%s இன் மொழிபெயர்ப்புகள்"

    #71 Telugu
    Locale["te"]["name"]       = "Telugu"
    Locale["te"]["endonym"]    = "తెలుగు"
    Locale["te"]["message"]    = "%s యొక్క అనువాదాలు"

    #72 Thai
    Locale["th"]["name"]       = "Thai"
    Locale["th"]["endonym"]    = "ไทย"
    Locale["th"]["message"]    = "คำแปลของ %s"

    #73 Turkish
    Locale["tr"]["name"]       = "Turkish"
    Locale["tr"]["endonym"]    = "Türkçe"
    Locale["tr"]["message"]    = "%s çevirileri"

    #74 Ukrainian
    Locale["uk"]["name"]       = "Ukrainian"
    Locale["uk"]["endonym"]    = "Українська"
    Locale["uk"]["message"]    = "Переклади слова або виразу \"%s\""

    #75 Urdu
    Locale["ur"]["name"]       = "Urdu"
    Locale["ur"]["endonym"]    = "اُردُو"
    Locale["ur"]["message"]    = "کے ترجمے %s"
    Locale["ur"]["rtl"]        = "true" # RTL language

    #76 Vietnamese
    Locale["vi"]["name"]       = "Vietnamese"
    Locale["vi"]["endonym"]    = "Tiếng Việt"
    Locale["vi"]["message"]    = "Bản dịch của %s"

    #77 Welsh
    Locale["cy"]["name"]       = "Welsh"
    Locale["cy"]["endonym"]    = "Cymraeg"
    Locale["cy"]["message"]    = "Cyfieithiadau %s"

    #78 Yiddish
    Locale["yi"]["name"]       = "Yiddish"
    Locale["yi"]["endonym"]    = "ייִדיש"
    Locale["yi"]["message"]    = "איבערזעצונגען פון %s"
    Locale["yi"]["rtl"]        = "true" # RTL language

    #79 Yoruba
    Locale["yo"]["name"]       = "Yoruba"
    Locale["yo"]["endonym"]    = "Yorùbá"
    Locale["yo"]["message"]    = "Awọn itumọ ti %s"

    #80 Zulu
    Locale["zu"]["name"]       = "Zulu"
    Locale["zu"]["endonym"]    = "isiZulu"
    Locale["zu"]["message"]    = "Ukuhumusha i-%s"

    # Aliases for some locales
    # See: <http://www.loc.gov/standards/iso639-2/php/code_changes.php>
    LocaleAlias["in"] = "id" # withdrawn language code for Indonesian
    LocaleAlias["iw"] = "he" # withdrawn language code for Hebrew
    LocaleAlias["ji"] = "yi" # withdrawn language code for Yiddish

    LocaleAlias["jw"] = "jv" # withdrawn language code for Javanese
    LocaleAlias["mo"] = "ro" # Moldavian or Moldovan considered a variant of the Romanian language
    LocaleAlias["sh"] = "sr" # Serbo-Croatian: prefer Serbian
    LocaleAlias["zh"] = "zh-CN" # Chinese: prefer Chinese Simplified
    LocaleAlias["zh-cn"] = "zh-CN" # lowercase
    LocaleAlias["zh-tw"] = "zh-TW" # lowercase
    # TODO: any more aliases supported by Google Translate?
}

# Get locale key by language code or alias.
function getCode(code) {
    code = tolower(code) # case-insensitive

    if (code in Locale || code == "auto")
        return code
    else if (code in LocaleAlias)
        return LocaleAlias[code]
    else
        return # return nothing if not found
}

# Detect external bidirectional algorithm utility (fribidi);
# Fallback to Unix `rev` if not found.
function initBiDi() {
    "fribidi --version 2>/dev/null" |& getline FriBidi
    BiDiNoPad = FriBidi ? "fribidi --nopad" : "rev"
    BiDi = FriBidi ? "fribidi --width %s" : "rev | xargs printf '%%ss\n'"
}

# Return the single-quoted string.
function parameterize(text) {
    gsub(/'/, "'\\''", text)
    return "'" text "'"
}

# Convert a logical string to visual; don't right justify RTL lines.
# Parameters:
#     code: ignore to apply bidirectional algorithm on every string
function show(text, code,    temp) {
    if (!code || Locale[getCode(code)]["rtl"]) {
        if (Cache[text][0])
            return Cache[text][0]
        else {
            ("echo " parameterize(text) " | " BiDiNoPad) | getline temp
            return Cache[text][0] = temp
        }
    } else
        return text
}

# Convert a logical string to visual and right justify RTL lines.
# Parameters:
#     code: ignore to apply bidirectional algorithm on every string
#     width: ignore to use default width for padding
function s(text, code, width,    temp) {
    if (!code || Locale[getCode(code)]["rtl"]) {
        if (!width) width = Option["width"]
        if (Cache[text][width])
            return Cache[text][width]
        else {
            ("echo " parameterize(text) " | " sprintf(BiDi, width)) | getline temp
            return Cache[text][width] = temp
        }
    } else
        return text
}

# Initialize strings for displaying endonyms of locales.
function initLocaleDisplay(    i) {
    for (i in Locale)
        Locale[i]["display"] = show(Locale[i]["endonym"], i)
}

# Parse a POSIX locale identifier and return the language code;
# Identified by both language identifier and region identifier.
# Parameters:
#     lang = [language[_territory][.codeset][@modifier]]
# See: <https://en.wikipedia.org/wiki/Locale>
function parseLang(lang,    code, group) {
    match(lang, /^([a-z][a-z][a-z]?)(_|$)/, group)
    code = getCode(group[1])

    # Detect region identifier
    ## Regions using Chinese Simplified: China, Singapore
    if (lang ~ /^zh_(CN|SG)/) code = "zh-CN"
    ## Regions using Chinese Traditional: Taiwan, Hong Kong
    else if (lang ~ /^zh_(TW|HK)/) code = "zh-TW"

    # FIXME: handle unrecognized language code
    if (!code) code = "en"

    return code
}

# Initialize `UserLang`.
function initUserLang() {
    UserLang = ENVIRON["LANG"] ? parseLang(ENVIRON["LANG"]) : "en"

    if (!(ENVIRON["LANG"] ~ /UTF-8$/))
        w("[WARNING] Your codeset of locale (" ENVIRON["LANG"] ") is not UTF-8. You have been warned.")
}

error: pathspec 'lib/Languages.awk' did not match any file(s) known to git


Create events.awk

Create events.awk

# events.awk
# (c) 2002 David Cuny
# process the events.i file and generate events.c and events.h

BEGIN {
    # file to write to
    source = "events.c"
    include = "events.h"

    while (getline < "events.i" > 0 ) {
        if ($1 == "//" || NF == 0) {
            # ignore

        } else if ($1 == "%event") {
            if (NF == 1) {
                theKey = "generic"
            } else {
                theKey = $2
            }

            if (!(theKey in keys)) {
                keys[theKey] = 1
            }

        } else {
            event[$1] = theKey
        }
    }

    # the include file
    print "/*" > include
    print "    Name:       events.h" > include
    print "    Purpose:    Classify wxWindows events" > include
    print "    Author:     David Cuny" > include
    print "    Copyright:  (c) 2002 David Cuny <dcuny@lanset.com>" > include
    print "    Licence:    LGPL" > include
    print > include
    print "    This file is autogenerated by events.awk from events.i" > include
    print "*/" > include
    print > include
    print "int wClassifyEvent(WXTYPE eventType);" > include

    # source banner
    print "/*" > source
    print "    Name:       events.c" > source
    print "    Purpose:    Classify wxWindows events" > source
    print "    Author:     David Cuny" > source
    print "    Copyright:  (c) 2002 David Cuny <dcuny@lanset.com>" > source
    print "    Licence:    LGPL" > source
    print > source
    print "    This file is autogenerated by events.awk from events.i" > source
    print "    Since events are no longer int values, a case statement" > source
    print "    can't be used here." > source
    print "*/" > source
    print > source

    # the header
    print "/* classifyEvent: return index of event class, or -1 if not found */" > source
    print "int wClassifyEvent(WXTYPE eventType)" > source
    print "{" > source

    # order by key
    for (key in keys) {
        printf( "    /* %s */\n", key ) > source

        if (key == "generic") {
            keyVal = "-1"
        } else {
            keyVal = "_" key
        }

        for (e in event) {
            if (event[e] == key) {
                printf ("    if (eventType == %-40s) return %s;\n", e, keyVal ) > source
            }
        }
        print "" > source
    }

    # all other cases
    printf( "    /* probably user defined */\n" ) > source
    printf( "    return -1;\n" ) > source
    printf( "}\n" ) > source
}

error: pathspec 'oldversions/0.51/events.awk' did not match any file(s) known to git


yes in awk

yes in awk

#!/bin/awk -f

BEGIN {
    for (i = 1; i < ARGC; i++) {
        yes = ((yes)(ARGV[i])" ")
    }

    if (!yes) {
        yes = "y";
    }

    while(1) {
        print yes;
    }
}

error: pathspec 'yes.awk' did not match any file(s) known to git


Our version of APRS's rc builder

Our version of APRS's rc builder

git-svn-id: b819289d3a0e8888cd070d2ae628b7cf730b797f@300115 13f79535-47bb-0310-9956-ffa450edef68

BEGIN {

  # ff bits: 1(debug), 2(prerelease), 4(patched), 8(vendor) and 32(special)
  # debug is summed based on the /Define _DEBUG
  # prerelease is based on the -dev extension,
  # patched is based on a non-standard "-ver" extension,
  # special and vendor are toggled by their args.
  #
  ff = 0;

  file=ARGV[1];
  desc=ARGV[2];
  rel_h=ARGV[3];

  filename = file;
  if (match(file, /\./)) {
    sub(/\.[^\.]*$/, "", file);
  }

  i = 4;
  while (length(ARGV[i])) {
    if (match(ARGV[i], /icon=/)) {
      icon = substr(ARGV[i], 6);
    }
    if (match(ARGV[i], /vendor=/)) {
      vendor = substr(ARGV[i], 8);
      ff = ff + 8;
    }
    if (match(ARGV[i], /special=/)) {
      special = substr(ARGV[i], 9);
      ff = ff + 32;
    }
    i = i + 1
  }

  i = i - 1;
  while (i) {
    delete ARGV[i];
    i = i - 1;
  }

  while ((getline < rel_h) > 0) {
    if (match ($0, /^#define TC._MAJOR_VERSION/)) {
      ver_major = $3;
    }
    if (match ($0, /^#define TC._MINOR_VERSION/)) {
      ver_minor = $3;
    }
    if (match ($0, /^#define TC._PATCH_VERSION/)) {
      ver_patch = $3;
    }
    if (match ($0, /^#define TC._IS_DEV_VERSION/)) {
      ver_suffix = "-dev";
      ver_build = "0";
    }
    if (match ($0, /^#undef TC._IS_DEV_VERSION/)) {
      ver_build = "100";
    }
    if (match ($0, /^.*Copyright /)) {
      copyright = substr($0, RLENGTH + 1);
    }
  }
  ver = ver_major "." ver_minor "." ver_patch ver_suffix;
  verc = ver_major "," ver_minor "," ver_patch "," ver_build;

  if (length(vendor)) {
    ff = ff + 8;
  }

  if (length(icon)) {
    print "1 ICON DISCARDABLE \"" icon "\"";
  }
  print "1 VERSIONINFO";
  print " FILEVERSION " verc "";
  print " PRODUCTVERSION " verc "";
  print " FILEFLAGSMASK 0x3fL";
  print "#if defined(_DEBUG)"
  print " FILEFLAGS 0x" sprintf("%02x", ff + 1) "L";
  print "#else"
  print " FILEFLAGS 0x" sprintf("%02x", ff) "L";
  print "#endif"
  print " FILEOS 0x40004L";
  print " FILETYPE 0x1L";
  print " FILESUBTYPE 0x0L";
  print "BEGIN";
  print "  BLOCK \"StringFileInfo\"";
  print "  BEGIN";
  print "    BLOCK \"040904b0\"";
  print "    BEGIN";
  print "    VALUE \"Comments\", "\
     "\"Licensed under the Apache License, Version 2.0 (the \"\"License\"\"); "\
     "you may not use this file except in compliance with the License.  "\
     "You may obtain a copy of the License at\\r\\n\\r\\n"\
     "http://www.apache.org/licenses/LICENSE-2.0\\r\\n\\r\\n"\
     "Unless required by applicable law or agreed to in writing, "\
     "software distributed under the License is distributed on an "\
     "\"\"AS IS\"\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, "\
     "either express or implied.  See the License for the specific "\
     "language governing permissions and limitations under the License.\\0\"";
  print "      VALUE \"CompanyName\", \"Apache Software Foundation\\0\"";
  print "      VALUE \"FileDescription\", \"" desc "\\0\"";
  print "      VALUE \"FileVersion\", \"" ver "\\0\"";
  print "      VALUE \"InternalName\", \"" file "\\0\"";
  print "      VALUE \"LegalCopyright\", \"Copyright " copyright "\\0\"";
  print "      VALUE \"OriginalFilename\", \"" filename "\\0\"";
  if (vendor) {
    print "      VALUE \"PrivateBuild\", \"" vendor "\\0\"";
  }
  if (special) {
    print "      VALUE \"SpecialBuild\", \"" vendor "\\0\"";
  }
  print "      VALUE \"ProductName\", \"Apache Portable Runtime\\0\"";
  print "      VALUE \"ProductVersion\", \"" ver "\\0\"";
  print "    END";
  print "  END";
  print "  BLOCK \"VarFileInfo\"";
  print "  BEGIN";
  print "    VALUE \"Translation\", 0x409, 1200";
  print "  END";
  print "END";
}

error: pathspec 'native/build/win32ver.awk' did not match any file(s) known to git


Add debugging tool which prints WebScraper field names

# Print field numbers and field names from a WebScraper csv file saved in tsv format

# INVOCATION:
#   awk -f printFieldNamesFrom-webscraper.awk -v maxRecordsToPrint=5 BritBoxSeasons-test-tabs.csv

BEGIN {
    FS="\t"
    # print 3 records unless overridden with "-v maxRecordsToPrint=<n>"
    if (maxRecordsToPrint == "") maxRecordsToPrint = 3
}

NR <= maxRecordsToPrint {
    print "Record " NR
    for ( i = 1; i <= NF; i++ ) {
        print i " - " $i
    }
    print ""
}

error: pathspec 'printFieldNamesFrom-webscraper.awk' did not match any file(s) known to git


add build.awk

add build.awk

#!/usr/bin/igawk -f

@include include/Commons.awk
@include metainfo.awk

function init() {
    Command   = "trans"

    BuildPath = "build/"
    Trans     = BuildPath Command

    ManPath   = "man/"
    Ronn      = ManPath Command ".1.ronn"
    RonnStyle = ManPath "styles/night.css"
    Man       = ManPath Command ".1"
}

# Task: clean
function clean() {
    ("rm -fr " parameterize(BuildPath)) | getline
    return 0
}

# Task: man
function man() {
    return system("ronn --manual=" parameterize(toupper(Command) " MANUAL") \
                  " --organization=" parameterize(Version) \
                  " --style=" parameterize(RonnStyle) \
                  " " Ronn)
}

# Task: build
function build(target,    group, inline, line) {
    # Default target: bash
    if (!target) target = "bash"

    ("mkdir -p " parameterize(BuildPath)) | getline

    if (target == "bash" || target == "zsh") {

        print "#!/usr/bin/env " target > Trans
        print > Trans

        print "read -r -d '' TRANS_PROGRAM << 'EOF'" > Trans
        if (fileExists(Program))
            while (getline line < Program) {
                match(line, /^[[:space:]]*@include[[:space:]]*"(.*)"$/, group)
                if (RSTART) {
                    # Include file
                    if (fileExists(group[1] ".awk"))
                        while (getline inline < (group[1] ".awk")) {
                            if (inline = squeeze(inline))
                                print inline > Trans # effective LOC
                        }
                } else {
                    if (line && line !~ /^[[:space:]]*#!/) {
                        # Remove preceding spaces
                        gsub(/^[[:space:]]+/, "", line)
                        print line > Trans
                    }
                }
            }
        print "EOF" > Trans

        print "read -r -d '' TRANS_MANPAGE << 'EOF'" > Trans
        if (fileExists(Man))
            while (getline line < Man)
                print line > Trans
        print "EOF" > Trans
        print "export TRANS_MANPAGE" > Trans

        print "TRANS_COMMAND=" Command > Trans
        print "export TRANS_COMMAND" > Trans

        print "TRANS_SCRIPT=$0" > Trans
        print "export TRANS_SCRIPT" > Trans

        print "export COLUMNS" > Trans

        print "gawk \"$TRANS_PROGRAM\" - \"$@\"" > Trans

        ("chmod +x " parameterize(Trans)) | getline
        return 0

    } else if (target == "awk" || target == "gawk") {

        if (fileExists(Program))
            while (getline line < Program) {
                match(line, /^[[:space:]]*@include[[:space:]]*"(.*)"$/, group)
                if (RSTART) {
                    # Include file
                    if (fileExists(group[1] ".awk"))
                        while (getline inline < (group[1] ".awk"))
                            print inline > Trans".awk"
                } else {
                    print line > Trans".awk"
                }
            }

        ("chmod +x " parameterize(Trans".awk")) | getline
        return 0

    } else {

        w("[FAILED] Unknown target: " AnsiCode["underline"] target AnsiCode["no underline"])
        w("         Supported targets: " \
          AnsiCode["underline"] "bash" AnsiCode["no underline"] ", " \
          AnsiCode["underline"] "zsh" AnsiCode["no underline"] ", " \
          AnsiCode["underline"] "gawk" AnsiCode["no underline"])
        return 1

    }
}

BEGIN {
    init()

    pos = 0
    while (ARGV[++pos]) {
        # -target [target]
        match(ARGV[pos], /^--?target(=(.*)?)?$/, group)
        if (RSTART) {
            target = tolower(group[2] ? group[2] : ARGV[++pos])
            continue
        }

        # [task]
        match(ARGV[pos], /^[^\-]/, group)
        if (RSTART) {
            append(tasks, ARGV[pos])
            continue
        }
    }

    # Default task: build
    if (!anything(tasks)) tasks[0] = "build"

    for (i = 0; i < length(tasks); i++) {
        task = tasks[i]
        status = 0
        switch (task) {

        case "clean":
            status = clean()
            break

        case "man":
            status = man()
            break

        case "build":
            status = build(target)
            break

        default: # unknown task
            status = -1
        }

        if (status == 0) {
            d("[OK] Task " AnsiCode["bold"] task AnsiCode["no bold"] " completed.")
        } else if (status < 0) {
            w("[FAILED] Unknown task: " AnsiCode["bold"] task AnsiCode["no bold"])
            exit 1
        } else {
            w("[FAILED] Task " AnsiCode["bold"] task AnsiCode["no bold"] " failed.")
            exit 1
        }
    }
}

error: pathspec 'build.awk' did not match any file(s) known to git


Script for printout out GC stats

Script for printout out GC stats

git-svn-id: a8b04003a33e1d3e001b9d20391fa392a9f62d91@1939 94700074-3cef-4d97-a70e-9c8c206c02f5

{
   gsub(/:/, " ");
   gctime += $(NF-1);
   totalTime = $1;
}

END {
    print "GC time: ", gctime, " Total Time ", totalTime, \
        " Percent ", gctime/totalTime * 100;
}

error: pathspec 'scripts/gc_sum.awk' did not match any file(s) known to git


update

update

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/stuartyeates/rsnz-fellows.git/'


Create zad5.awk

Create zad5.awk

#Posortować i wypisać z pliku /etc/passwd loginy wszystkich użytkowników.

BEGIN {FS=":"} {print $1} # |sort

error: pathspec 'AWK/zad5.awk' did not match any file(s) known to git


add ngramfreq.awk

add ngramfreq.awk

#!/usr/bin/awk -f
# usage: awk -f ngramfreq.awk -v N=2
BEGIN {
    FS = "";
    # N = 2; # change this or specify in arguments
}
{
    for (i = 1; i <= NF-N+1; i++) {
        frag = "";
        for (j = 0; j < N; j++) {
            frag = frag $(i+j);
        }
        ngram[frag]++;
    }
}
END {
    for (i in ngram) {
        print ngram[i], i;
    }
}

error: pathspec 'ngramfreq.awk' did not match any file(s) known to git


initial checkin of awk script for summarizing TransferLog data

BEGIN {
    num_hosts = 0;
    num_users = 0;
}
{
    if ($3 != "RECV" && $3 != "SENT") {
	if (num_hosts == 0) {
	    StartDate = $1;
	    StartTime = $2;
	} else {
	    EndDate = $1;
	    EndTime = $2;
	}
	if (AttemptedSends[$9] == 0 && AttemptedRecvs[$9] == 0) {
	    Hosts[num_hosts] = $9;
	    num_hosts++;
	}
	split($10, user_tmp, "\@");
	User = user_tmp[1];
	if (AttemptedSends[User] == 0 && AttemptedRecvs[User] == 0) {
	    Users[num_users] = User;
	    num_users++;
	}
	if ($3 == "S") {
	    AttemptedSends[$9]++;
	    AttemptedSends[User]++;
	    if ($4 != "F") {
		CompletedSends[$9]++;
		CompletedSends[User]++;
		BytesSent[$9] += $5;
		BytesSent[User] += $5;
		TimeSending[$9] += $7;
		TimeSending[User] += $7;
	    }
	} else {
	    AttemptedRecvs[$9]++;
	    AttemptedRecvs[User]++;
	    if ($4 != "F") {
		CompletedRecvs[$9]++;
		CompletedRecvs[User]++;
		BytesRecvd[$9] += $5;
		BytesRecvd[User] += $5;
		TimeReceiving[$9] += $7;
		TimeReceiving[User] += $7;
	    }
	}
    }
}
END {
    printf("\nCheckpoint Server Transfer Log Data from %s %s to %s %s\n\n",
	   StartDate, StartTime, EndDate, EndTime);
    printf("%-16.16s %9.9s %7.7s %9.9s %7.7s %9.9s %7.7s\n",
	   "", "Send", "Send", "Receive", "Receive", "Total", "Total");
    printf("%-16.16s %9.9s %7.7s %9.9s %7.7s %9.9s %7.7s\n",
	   "", "Bandwidth", "Success", "Bandwidth", "Success", "Bandwidth",
	   "Success");
    printf("%-16.16s %9.9s %7.7s %9.9s %7.7s %9.9s %7.7s\n\n",
	   "User/Host", "(Mb/s)", "Rate", "(Mb/s)", "Rate", "(Mb/s)", "Rate");
    for (i=0; i < num_users; i++) {
	User = Users[i];
	Bytes = BytesSent[User] + BytesRecvd[User];
	Time = TimeSending[User] + TimeReceiving[User];
	Attempted = AttemptedSends[User] + AttemptedRecvs[User];
	Completed = CompletedSends[User] + CompletedRecvs[User];
	if (TimeSending[User] > 0 && TimeReceiving[User] > 0) {
	    printf("%-16.16s %9.2f %6.0f%% %9.2f %6.0f%% %9.2f %6.0f%%\n",
		   User,
		   BytesSent[User]*8/TimeSending[User]/1024000,
		   CompletedSends[User]/AttemptedSends[User]*100,
		   BytesRecvd[User]*8/TimeReceiving[User]/1024000,
		   CompletedRecvs[User]/AttemptedRecvs[User]*100,
		   Bytes*8/Time/1024000,
		   Completed/Attempted*100);
	}
    }
    printf("\n");
    for (i=0; i < num_hosts; i++) {
	Host = Hosts[i];
	Bytes = BytesSent[Host] + BytesRecvd[Host];
	Time = TimeSending[Host] + TimeReceiving[Host];
	Attempted = AttemptedSends[Host] + AttemptedRecvs[Host];
	Completed = CompletedSends[Host] + CompletedRecvs[Host];
	if (TimeSending[Host] > 0 && TimeReceiving[Host] > 0) {
	    printf("%-16.16s %9.2f %6.0f%% %9.2f %6.0f%% %9.2f %6.0f%%\n",
		   Host,
		   BytesSent[Host]*8/TimeSending[Host]/1024000,
		   CompletedSends[Host]/AttemptedSends[Host]*100,
		   BytesRecvd[Host]*8/TimeReceiving[Host]/1024000,
		   CompletedRecvs[Host]/AttemptedRecvs[Host]*100,
		   Bytes*8/Time/1024000,
		   Completed/Attempted*100);
	}
	TotalBytesSent += BytesSent[Host];
	TotalBytesRecvd += BytesRecvd[Host];
	TotalTimeSending += TimeSending[Host];
	TotalTimeReceiving += TimeReceiving[Host];
	TotalAttemptedSends += AttemptedSends[Host];
	TotalAttemptedRecvs += AttemptedRecvs[Host];
	TotalCompletedSends += CompletedSends[Host];
	TotalCompletedRecvs += CompletedRecvs[Host];
    }
    TotalBytes = TotalBytesSent + TotalBytesRecvd;
    TotalTime = TotalTimeSending + TotalTimeReceiving;
    TotalAttempted = TotalAttemptedSends + TotalAttemptedRecvs;
    TotalCompleted = TotalCompletedSends + TotalCompletedRecvs;
    if (TotalTimeSending > 0 && TotalTimeReceiving > 0) {
	printf("\n%-16.16s %9.2f %6.0f%% %9.2f %6.0f%% %9.2f %6.0f%%\n\n",
	       "Overall",
	       TotalBytesSent*8/TotalTimeSending/1024000,
	       TotalCompletedSends/TotalAttemptedSends*100,
	       TotalBytesRecvd*8/TotalTimeReceiving/1024000,
	       TotalCompletedRecvs/TotalAttemptedRecvs*100,
	       TotalBytes*8/TotalTime/1024000,
	       TotalCompleted/TotalAttempted*100);
    }
    printf("\n%-16.16s %25.25s %25.25s\n\n", "User", "MB Sent", "MB Received");
    for (i=0; i < num_users; i++) {
	User = Users[i];
	printf("%-16.16s %25.0f %25.0f\n",
	       User, BytesSent[User]/1024000, BytesRecvd[User]/1024000);
    }
    printf("\n%-16.16s %25.0f %25.0f\n",
	   "Total", TotalBytesSent/1024000, TotalBytesRecvd/1024000);
}

error: pathspec 'src/condor_ckpt_server/xfer_log.awk' did not match any file(s) known to git


awk script for generating symbol export lists for AIX shared object links

error: pathspec 'scripts/exports.awk' did not match any file(s) known to git


a primitive converter from Google's wiki syntax to LaTeX

BEGIN {
  print "%TCIDATA{Version=5.00.0.2606}";
  print "%TCIDATA{LaTeXparent=0,0,classes.tex}";
  print "                      ";
  print "";
  print "%%%%% BEGINNING OF DOCUMENT BODY %%%%%";
  print "% html: Beginning of file: `clean.html'";
  print "% DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"";
  print "%  This is a (PRE) block.  Make sure it's left aligned or your toc title will be off. ";
  print "";
  quoting = 0;
  itemizing = 0;
}

END {
  print "% html: End of file: `clean.html'";
  print "";
  print "%%%%% END OF DOCUMENT BODY %%%%%";
  print "% In the future, we might want to put some additional data here, such";
  print "% as when the documentation was converted from wiki to TeX.";
  print "%";
}

## pragmas do not count
/\#labels/ {
  next;
}

itemizing && !/^   *\*/ {
  print "\\end{itemize}";
  itemizing = 0;
}

quoting && /^  / {
  sub(/^  /, "");
  print;
  next;
}

quoting && !/^  / {
  print "\\end{quotation}";
  quoting = 0;
}

## empty lines do not count
/^ *$/ {
  next;
}

/`/ {
  line = $0;
  sub(/`/, "\\texttt{", line);
  sub(/`/, "}", line);
  $0 = line
}

/==/ {
  sub(/==/, "\\subsection*{");
  sub(/==/, "}");
  print;
  next;
}

/=/ {
  sub(/=/, "\\section*{");
  sub(/=/, "}");
  print;
  next;
}

!itemizing && /^   *\*/ {
  print "\\begin{itemize}";
  itemizing = 1;
}

itemizing && /^   *\*/ {
  sub(/^   *\*/, "\\item");
  print;
  print "";
  next;
}

/^  / {
  print "\\begin{quotation}";
  quoting = 1;
  sub(/^  /, "");
  print;
  next;
}

{ print }

error: pathspec 'tools/wiki2latex.awk' did not match any file(s) known to git


Added analyze.awk.

Added analyze.awk.

#!/usr/bin/awk -f

{
	for (i = 1; i <= NF; ++i) {
	    split ($i, fields, "=");
	    s1[fields[1]] += fields[2];
	    s2[fields[1]] += (fields[2] * fields[2]);
	}
}

END {
    for (i in s1) {
    	avg[i] = s1[i] / NR;
	dev[i] = sqrt (NR * s2[i] - s1[i] * s1[i]) / NR / sqrt (NR) * 1.96; # 95% Confidence interval.
    }

    for (i in avg) {
    	printf ("%s %0.12f %0.12f\n", i, avg[i], dev[i]);
    }
}

error: pathspec 'examples/analyze.awk' did not match any file(s) known to git


add translate.awk

add translate.awk

#!/usr/bin/gawk -f

# This is free and unencumbered software released into the
# public domain.
#
# This software is provided for the purpose of personal, reasonable
# and convenient human use of the Google Translate Service, i.e.,
# only for those who feel that their terminal is more accessible
# than a web browser. For other purposes, please use the official
# Google Translate API <https://developers.google.com/translate/>.
#
# By using this software, you ("the user") agree that:
#
# 1. Neither this software nor its author is affiliated with
# Google Inc. ("Google").
#
# 2. By using this software, the user is de facto using web
# services provided by Google, therefore they are obliged to
# follow the Google Terms of Service.
#
# 3. This software is provided "as is". The user of this software
# shall be fully liable for any possible infringement of, including
# but not limited to, the Google Terms of Service; per contra,
# the user must be aware that their data might be collected by
# Google, therefore they shall be liable for their own privacy
# concern, including but not limited to, possible disclosure of
# personal information. See the (un)LICENSE file for more details.

@include "metainfo"

@include "include/Commons"

@include "include/Languages"
@include "include/Help"
@include "include/PLTokenizer"
@include "include/PLParser"
@include "include/Translate"
@include "include/Shell"

@include "include/Main"

error: pathspec 'translate.awk' did not match any file(s) known to git


Create zad1.awk

Create zad1.awk

#zad1
#Z pliku /etc/passwd wyświetlić nazwy tych użytkowników, którzy korzystają z interpretera tcsh.

BEGIN {FS=":"}
/tcsh/ {print $1}

error: pathspec 'AWK/zad1.awk' did not match any file(s) known to git


minimal functionality

minimal functionality

BEGIN { relevant = 0; line = 1 }
/@Haskell.*@Begin/ { relevant = 1; print "#line", line }
/@End.*@Haskell/ { relevant = 0 }

{ line++; if (relevant) { if (relevant > 1) print; relevant++ } }

error: pathspec 'purgatory/extract.awk' did not match any file(s) known to git


INTEGRATION: CWS changefileheader (1.7.402); FILE MERGED 2008/03/28 15:55:23 rt 1.7.402.1: #i87441# Change license header to LPGL v3.

#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# $RCSfile: header.hxx,v $
#
# $Revision: 1.1 $
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org.  If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************

# Add symbol patterns _ZTI* and _ZTS* to the global section of version UDK_3_0_0
# (and if that version is not yet present, add it).  For C++ exception handling
# to work across libraries, it is important that all libraries use those symbols
# with the same version name.
#
# The below code fails with 'perverted' mapfiles (using a strange line layout,
# or containing version UDK_3_0_0 without a global section, ...).

BEGIN { state = 0 }
END {
    if (state == 0) {
        print "# Weak RTTI symbols for C++ exceptions:"
        print "UDK_3_0_0 {"
	print "\tglobal:"
	print "\t_ZTI*; _ZTS*;"
        print "};"
    }
}
state == 2 {
    print "        _ZTI*; _ZTS*; # weak RTTI symbols for C++ exceptions"
    state = 3
}
# #i66636# - ???
/^[\t ]*UDK_3_0_0[\t ]*\{/ { state = 1 }
/^[\t ]*global[\t ]*:/ && state == 1 { state = 2 }
{ print }

error: pathspec 'solenv/bin/addsym.awk' did not match any file(s) known to git


Fix the alignment awk program not outputting anything from last match to the end of utterance

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/cybeliak/mispronounceableness.git/'


Switch back to 3 consecutive words by default, and allow shorter utterances to be aligned


Add my awk script to update AUTHORS file

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/dreamllq/node.git/'


while (getline < "setup.ini") {

while (getline < "setup.ini") {

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/svnpenn/sage.git/'