AA-awk-history
http://awk.freeshell.org/AA-awk-history\\ a concise history of awk and some of its forks\\ {{{ common . . . princeton [3] polyawk/tawk ~1989 PolyTron [4] gawk 1986 gnu [5] mawk ? M.Brennan [6] busybox ? [7] . . . https://www.gnu.org/software/gawk/\\ http://www.drdobbs.com/open-source/gnu-awk-this-is-not-your-fathers-awk/240158351\\ . . .
2K - last updated 2013-10-26 02:28 UTC by g0ph3r
AA-awk-one-page
http://awk.freeshell.org/AA-awk-one-page\\ 2013-09-19 20:23:02 http://awk.freeshell.org/g0ph3r\\ attempt . . . single pdf file ))\\ http://www.gnu.org/software/gawk/manual/html_node/Getting-Started.html\\ \\ wiki: . . . http://scottn.us/downloads/awk64.exe\\ \\ gawk (gnu awk) 4.1.0 2013-05-10\\ home: http://www.gnu.org/software/gawk/\\ . . . expose' of gawk 4.1: ((extensive additions to original awk))\\ . . . source: ftp://ftp.gnu.org/gnu/gawk/\\ exe-cutable: http://sourceforge.net/projects/ezwinports/files/\\ . . .
2K - last updated 2013-09-20 06:55 UTC by g0ph3r
Adler32Checksum
As documented in the [[http://en.wikipedia.org/wiki/Adler-32 | Adler-32 Wikipedia article]]. {{{ awk . . . keys. Yikes! Mawk mitigates this somewhat, but # gawk and busybox awk take an unpleasant performance . . . hacker beware! } } return a + (2^16 * b) # gawk supports bitwise operations that would simplify . . .
4K - last updated 2008-12-31 12:05 UTC by pgas
AllAboutGetline
//Editor's notes: The article was originally posted on the comp.lang.awk newsgroup, and can still be . . . The "command ~|& ..." variants are GNU awk (gawk) extensions. gawk also populates the ERRNO builtin . . . **f)** In POSIX-compliant awks (e.g. gawk --posix) a failure of getline (e.g. trying to . . . the data and write the sorted data back to the gawk program. Once all of the data has been read, gawk . . . does not receive an end-of-file indication until gawk closes the write end of the pipe. Other programs . . .
16K - last updated 2009-02-15 22:14 UTC by waldner
ArrayLength
Posix does not define a way to get the length of an array, while you could use a loop to count the elements . . . an array see AwkFeatureComparison. Up to now (ie gawk 3.1.6) you cannot use length on an array passed . . . as an argument to a function: {{{ awk #!/usr/bin/gawk -f function foo(array){ # does not work! you need . . . code results in: {{{ the length of array is 2 gawk: ./length.gawk:3: fatal: attempt to use array . . . scalar context }}} This problem is fixed in the gawk-stable CVS version available from savannah.gnu.org. . . .
2K - last updated 2009-02-09 09:45 UTC by arnold.robbins
awk-glossary
concise glossary of the essential awk - Last edited 2014-08-04 02:26 UTC\\ Contents: . . . Brian W. Kernighan -- the ''//k//'' of awk ))\\ gawk: gnu version of . . . https://www.gnu.org/software/gawk/\\ mawk: michael . . . GEAP: GAWK: Effective AWK Programming\\ . . . http://www.gnu.org/software/gawk/manual/html_node/\\ help: . . .
5K - last updated 2014-08-04 03:23 UTC by y0tta
awk.exe
[[awk.exe]] Last edited 2013-05-27 23:57:16 PDT\\ The first is from Dr. Kernighan - the k of awk.\\ gawk . . . file: http://scottn.us/downloads/awk64.exe\\ \\ gawk.exe version 4.1.0\\ (compiled with mingw)\\ from: . . . has no MPFR)\\ docs: http://www.gnu.org/software/gawk/manual/\\ book: [[http://shop.oreilly.com/product/9780596000707.do| . . . by AD Robbins]]\\ (450 page exposé of gawk/awk/mawk)\\ \\ mawk.exe version 1.3.4 (file date . . .
2K - last updated 2013-05-28 07:57 UTC by g0ph3r
awk 2012 ISO
**[[awk_2012_ISO]]** revised: . . . D. Robbins (maintainer of gawk)\\ home: http://www.skeeve.com\\ . . . gawk: http://www.gnu.org/software/gawk\\ . . .
4K - last updated 2012-09-16 03:39 UTC by g0ph3r
awk benchmarks
post awk benchmarks here:\\ see http://awk.freeshell.org/awk.exe for awks used here.\\ {{{awk C:\#> . . . mawk 17.066 seconds gawk 4.0.1 3:15.422 min 11.45 times slower }}} {{{awk . . . C:\#> tt %gawk% -v n=4e3 -v s=x BEGIN{n+=0;for(i=1;i!=2048;i*=2)s=(s)(s);print( . . . mawk 1.482 gawk 15.432 (10.4) awk95 14.086 (9.5) awk64 10.288 . . .
1K - last updated 2012-08-26 14:21 UTC by g0ph3r
awka
Awka is comprised of an awk-to-C translator and a library the C code is linked against, to produce executables . . . Awka strives to be compatible with both gawk and POSIX (libmawk, of course, should have the . . .
2K - last updated 2012-01-14 18:36 UTC by lewellyn
AwkGuide
** Work in Progress ** {{{ import from Mark Hobley's wiki }}} <toc> ---- == Overview * [[Overview]] . . . * [[foreach]] loops * [[FS]] * [[function]]s * [[gawkism]]s * [[getline]] * [[goto]] * [[grouping arguments]] . . . to suit different awk versions * [[Converting gawk scripts to traditional awk]] * [[gawkism]]s . . .
4K - last updated 2011-08-14 15:57 UTC by markhobley
AwkOnWindows
[[AwkOnWindows|This page]] lists available versions of awk for ms windows.\\ Example: //awk /foo/{print(NR,$0)} . . . of awk include [[http://www.gnu.org/software/gawk/manual/| gawk]] which adds many extensions and\\ . . . Win32 versions of awk (bwk-princeton) 20100228, gawk 3.1.7, \\ and mawk 1.3.3 Ported to Win32 by Olaf . . . is mawk(1) manual http://www.klabaster.com/progs/gawk32.zip 353kB\\ gawk.exe - version 3.1.7 compiled . . . with Mingw 365kB\\ also contains pgawk.exe - a profiler version of gawk ---- ---- [[g0pher]] . . .
2K - last updated 2010-10-24 09:39 UTC by g0pher
AwkOnWindowsHowto
AwkOnWindowsHowto\\ rough cut - needs edit {{{ 3) awk command line switches/usage from a win32 cmd.exe . . . - the ; time subtracted from next awk95 nawk gawk mawk ; 0.73 1.00 1.37 1.20 i++; 1.69 1.54 2.32 . . .
3K - last updated 2010-10-24 07:44 UTC by g0pher
AwkTips
<toc> ---- == Be idiomatic! In this paragraph, we give some hints on how to write more idiomatic . . . file. {{{ # another way, needs GNU awk LC_ALL=C gawk -v RS='FOO[0-9]*\n' -v ORS= '{print > "out"NR}' . . . of the input. We will see other examples where gawk's support for regexes as RS is useful. Note that . . . With GNU awk, we can do this: {{{ gawk -v RS='</?tag>' 'RT=="</tag>"' or . . . again gawk -v RS='</?tag>' '!(NR%2)' }}} and be done . . .
31K - last updated 2009-03-24 16:54 UTC by waldner
AwkVsPerl
A valid question, since awk is a subset of perl (functionally, not necessarily syntactically); also, . . . has to be written in traditional awk. However, gawk 3.1.0's /inet and ftwalk's built-in networking . . .
2K - last updated 2011-01-22 05:33 UTC by steve
AwkVsPerlJapanese
A valid question, since awk is a subset of perl (functionally, not necessarily syntactically); also, . . . has to be written in traditional awk. However, gawk 3.1.0's /inet and ftwalk's built-in networking . . .
2K - last updated 2008-11-24 08:05 UTC by pgas
Backreferences
The usual (and correct) answer for backreferences in awk (for example, the answer you can get on #awk . . . "a" or "c" $ echo 'a1-b2-c3-a5-s6-a7-f8-e9-a0' | gawk '{print gensub(/([ac])([0-9])/,"\\2+\\1","g",$0)}' . . . to indicate replacement of all matches. See the gawk manual for more information (including why backslashes . . .
3K - last updated 2010-12-30 06:53 UTC by ppp089210039107.dsl.hol.gr
BackslashInRegexp
Because {{{"\\$"}}} is a string and {{{/\\$/}}} is not; in strings, some of the escape characters get . . . 4 bytes instead of 1. In compatibility mode, gawk will treat it as though it were escaped , namely . . .
2K - last updated 2008-11-26 12:27 UTC by pgas
bitwise operator
Traditional [[awk]] implementations do not support bitwise operators. == Function Gawkisms == Bitwise . . . can be carried out using the following [[gawkism]]s: * [[and]] * [[lshift]] * [[or]] * [[rshift]] . . .
1K - last updated 2011-03-07 19:55 UTC by markhobley
CAAN-or-caan
**caan: the comprehensive awk archive network**\\ -or-\\ . . . tutorial: http://www.gnu.org/software/gawk/manual/html_node/Getting-Started.html\\ ---- **Archives:**\\ . . . 20070501\\ \\ gawk: http://www.gnu.org/software/gawk/ . . . 4.1.1 \\ gawk(1): ftp://hpux.connect.org.uk/hpux/Gnu/gawk-4.1.1/gawk-4.1.1.man.html\\ . . . changes:https://www.gnu.org/software/gawk/manual/html_node/Feature-History.html\\ exe:http://sourceforge.net/projects/ezwinports/files/gawk-4.1.1-w32-bin.zip/download\\ . . .
4K - last updated 2014-05-29 02:01 UTC by g0ph3r
CaseInsensitive
{{{}}}**Use tolower()** * portable * must be explicitly used for each comparison Instead of: {{{ awk . . . $1..$NF also }}} {{{}}} **Use IGNORECASE=1;** * gawk only * used for all comparisons, regex comparisons, . . .
1K - last updated 2008-11-26 12:39 UTC by pgas
CAWKLib
=CAWKLib CAWKlib is a library of functions for for awk intended to be used with preprocessors/wrappers . . . that it would replace/alter ## I thought "shebangawk" was quite lengthy and slightly vulgar # Initially . . .
5K - last updated 2015-01-29 10:14 UTC by 108-243-116-77.lightspeed.cicril.sbcglobal.net
comp.lang.awk FAQ
This material of this faq originates from the comp.lang.awk FAQ that you can find there: * http://www.faqs.org/faqs/computer-lang/awk/faq/ . . . this answer]] ---- == How do I report a bug in gawk? <include "How do I report a bug in gawk"> . . . Edit this answer]] ---- == Is there an easy way . . .
8K - last updated 2009-03-04 12:42 UTC by pgas
comp.lang.awk FAQJapanese
This material of this faq originates from the comp.lang.awk FAQ that you can find there: * http://www.faqs.org/faqs/computer-lang/awk/faq/ . . . this answer]] ---- == How do I report a bug in gawk? <include "How do I report a bug in gawkJapanese"> . . . Edit this answer]] ---- == Is there an . . .
4K - last updated 2008-11-24 09:01 UTC by pgas
ConvertHexToFloatingPoint
This code uses [[gawkism|gawk specific features]], such as the [[http://www.gnu.org/manual/gawk/html_node/Strtonum-Function.html][strtonum]] . . . function, so [[gawk]] is required to utilize this function. This code . . .
3K - last updated 2010-06-23 19:49 UTC by john b
Converting gawk scripts to traditional awk
== _Scripts that contain gawkisms may not operate correctly on some systems_ Scripts that contain awk . . . [[gawkism]]s may not operate correctly on on systems . . .
1K - last updated 2009-03-18 13:04 UTC by Mark Hobley
ENVIRON
Modern versions of new awk (gawk, mawk, Bell Labs awk, any POSIX awk) all provide an array named ENVIRON. . . .
1K - last updated 2008-11-19 13:13 UTC by pgas
ENVIRONJapanese
Modern versions of new awk (gawk, mawk, Bell Labs awk, any POSIX awk) all provide an array named ENVIRON. . . .
1K - last updated 2008-11-24 08:05 UTC by pgas
ExitCode
Normally, the `exit' command exits with a value of zero. You can supply an optional numeric value to . . . This is documented in the GNU Awk User's Guide (gawk.texi). If you have an END block you want to be . . .
1K - last updated 2008-11-26 12:30 UTC by pgas
exponent
==Warning! The use of [[gawkism]]s will prevent the script from running correctly on systems that use . . . for [[arithmetic]] exponential operations is a [[gawkism]] and will not work in traditional [[awk]]. . . . {{{ }}} **The doublestar gawkism** *The [[doublestar]] gawkism acts as a dyadic . . . of 3) }}} **Precedence** *The exponent operator gawkism has a higher [[precedence]] than all other . . . exponent [[combination assignment operator]] gawkism represented by a [[starstarequals]] trigraph, . . .
2K - last updated 2012-03-20 07:33 UTC by g0pher
faster awk
1) optimize your code ie array references are slow 2) use a faster awk mawk 3) use gawk ability to include . . .
1K - last updated 2012-04-20 07:21 UTC by g0pher
FindAllMatches
This bit of code will match all non-overlapping instances of a given pattern in a string and will store . . . some of the functionality provided by the gawk extension to match() that stores the matched text . . .
2K - last updated 2009-03-24 09:46 UTC by waldner
FIXES
[[FIXES]] revised: . . . be the right behavior.\\ enhanced split(), as in gawk, etc: split(s, a, "") splits . . . if FS is "".\\ \\ added nextfile, as in gawk: causes immediate advance to next input file.\\ . . .
6K - last updated 2014-01-15 23:17 UTC by g0ph3r
g0pher
Notes: [[g0pher]] from [[irc://irc.freenode.net//#awk|#awk channel on freenode]]. *Latest (2012-03-18) . . . |awkcard.pdf]] is nine page summary of gawk(3.1.7)/awk/mawk.\\ **the help file gawk.hlp 3.1.3 . . . [[http://sourceforge.net/projects/gnuwin32/files/gawk/3.1.3-2/ |gawk-3.1.3-2-doc.zip]] for\\ "GAWK: . . .
2K - last updated 2013-05-28 04:13 UTC by g0ph3r
gawk
===gawk=== The [http://www.gnu.org/software/gawk/|GNU] version of awk. It features decent compatibility . . .
1K - last updated 2011-03-30 03:33 UTC by 87.83.232.221.broad.wh.hb.dynamic.163data.com.cn
gawkism
Gawkisms are non portable syntax components that do not work with some awk implementations. The use of . . . [[awk]] gawkisms will prevent the script from running correctly . . . * [[xor]] (bitwise function) ---- [[Removing gawkisms from buggy build scripts]] [[Converting gawk . . .
2K - last updated 2011-05-19 22:29 UTC by markhobley
GeoLocation
{{{ awk #!/bin/gawk -f function getcoord(string, a) { split(string, a, ":") gsub(/\"/, "", a[2]) return . . .
1K - last updated 2011-11-14 16:35 UTC by pgas
Glossary
[[Glossary| Glossary]]\\ see also [[AwkOnWindows| AwkOnWindows]] and [[FIXES| FIXES]] and [[AwkOnWindowsHowto| . . . 'harder than anticipated to use Gawk as a reference implementation;' .... 'although . . . the most mysterious code known to man' (in the gawk.html doc - attributed to bwk) http://www.gnu.org/software/gawk/manual/ . . .
2K - last updated 2010-10-24 08:14 UTC by g0pher
HomePage
This wiki is maintained by regulars from the **#awk** channel on **[[https://libera.chat/|irc.libera.chat]]** . . . the mapping of keys -> values in an array === gawk specific code snippets The following functions . . . utilize [[gawkism|gawk specific features]], and so require the . . . use of the [[gawk]] interpreter in order to operate: * [[ConvertHexToFloatingPoint]] . . . performance's sake. ---- == Variants of awk * [[gawk]] * [[mawk]]/[[libmawk]] * [[bwk]] * [[nawk]] . . .
5K - last updated 2023-06-26 04:15 UTC by HappMacDonald
HomePageJapanese
Here is the Japanese page for [[HomePage]]. 英語のページは[[HomePage|こちら]]です。 この wiki は **[[http://www.freenode.net|irc.freenode.net]]** . . . == ドキュメント * http://www.gnu.org/software/gawk/manual/ - さまざまなフォーマットの GNU Awk のマニュアルです。また、[[http://www.amazon.co.jp/Effective-Awk-Programming-Arnold-Robbins/dp/0596000707|"Effective . . . コマンドとユーティリティの参照」)。 * http://www.gnu.org/software/gawk/manual/gawkinet/ - gawk のネットワークを用いた衝撃的な使用方法を記述した少し不明瞭ではあるけれど//非常に//素晴らしい文書である . . . "Gawkinet: TCP/IP Internetworking with gawk" (「Gawkinet: . . . gawk を用いた TCP/IP インターネット」)。(Plan 9 のユーザーはそうした言語レベルの拡張は醜く不必要なものだとして、彼らの . . .
5K - last updated 2008-10-19 07:34 UTC by hi saito
How do I report a bug in gawk
This is described in great detail in the gawk documentation. In brief: # Make sure what you've discovered . . . (or lack thereof). # Send mail to <mailto:bug-gawk@gnu.org>. This automatically sends a copy to . . .
1K - last updated 2008-11-18 12:07 UTC by pgas
How do I report a bug in gawkJapanese
This is described in great detail in the gawk documentation. In brief: # Make sure what you've discovered . . . (or lack thereof). # Send mail to <mailto:bug-gawk@gnu.org>. This automatically sends a copy to . . .
1K - last updated 2008-11-24 08:07 UTC by pgas
Inicio
Este wiki es mantenido por los usuarios del cenal **#awk** en **[[http://www.freenode.net|irc.freenode.net]]**. . . . versiones de awk * [[ConvirtiendoProgramasEnGawkAlAwkTradicional]] == Noticias * un nuevo sitio . . . == Documentación * http://www.gnu.org/software/gawk/manual/ - the GNU Awk manual in a variety of formats; . . . awk source code) * http://www.gnu.org/software/gawk/manual/gawkinet/ - "Gawkinet: TCP/IP Internetworking . . . with gawk", a relatively obscure but /very/ nifty document . . .
7K - last updated 2009-02-12 23:31 UTC by fcr
LargestAccurateNumber
Most [[awk]] implementations use floating point double precision to represent every kind of numeric value. . . . value that this process finds for my instance of gawk 3.1.5 running under 32-bit Linux is 2^53-1, with . . .
3K - last updated 2013-04-12 14:52 UTC by ttmrichter
LastField
awk performs a number of actions automatically when it parses lines: it updates the variable NF, which . . . entries for..: * [http://www.gnu.org/software/gawk/manual/html_node/Auto_002dset.html|Built-in Variables . . . information]; * [http://www.gnu.org/software/gawk/manual/html_node/Fields.html|Examining fields] . . .
2K - last updated 2009-02-05 22:43 UTC by firebush.stsci.edu
LevenshteinEditDistance
The [http://en.wikipedia.org/wiki/Levenshtein_distance|Levenshtein edit distance] calculation is useful . . . versions, all of which were benchmarked across gawk, mawk and busybox awk. The approaches started . . .
6K - last updated 2010-04-16 10:19 UTC by pgas
LinksPage
<toc> ---- == websites dedicated to awk == * [[http://awk.info/|awk.info]] news and articles about . . . The new awk manual * http://www.gnu.org/software/gawk/manual/ - the GNU Awk manual in a variety of formats; . . . awk source code) * http://www.gnu.org/software/gawk/manual/gawkinet/ - "Gawkinet: TCP/IP Internetworking . . . with gawk", a relatively obscure but /very/ nifty document . . . explaining how to make impressive use of gawk's networking facilities (though Plan 9 users are . . .
4K - last updated 2015-02-24 14:45 UTC by pgas
LshalOutputParser
=== Problem Specification 10:50 <Thanatermesis> i want to obtain the model of the disk, for example, . . . error!") } }}} === Sample Output {{{ $ lshal | gawk -f ./lshal-parse device: '/org/freedesktop/Hal/devices/storage_serial_NLB9T3413AVB' . . .
3K - last updated 2008-06-27 16:22 UTC by gnomon
mawk wish list
[[mawk_wish_list]]\\ mawk 1.3.4 from Thomas Dickey http://invisible-island.net/mawk/\\ his mawk is even . . . references it is 3X ~~ 10X faster than awk or gawk\\ \\see file http://invisible-island.net/mawk/CHANGES . . . 7 - 64 bit. 2) the -W source switch as in gawk 3) system() is broke in mawk.exe / windows 7 - . . . in A) j++; print j;}" took 9.2 seconds whereas gawk.exe 4.0.1 took 26.2 seconds }}} ---- 2012-08-25 . . .
2K - last updated 2013-05-28 04:04 UTC by g0ph3r
MayorNumeroPreciso-español
La mayoría de las implementaciones usan números de coma flotante de alta precisión conocidos como "double" . . . encuentra al correr en mi computadora con gawk 3.1.5 bajo linux en i386 es 2^52, esto se debe . . .
1K - last updated 2009-01-03 07:01 UTC by fcr
MostrarApostrofos-español
Esta pregunta es tan frecuente que merece su propia respuesta. Y aunque pareciera que esto es una limitación . . . por ejemplo el siguiente fragmento de código en gawk, mawk y en el awk de busybox y compare los resultados: . . . el awk del busybox dan los resultados esperados, gawk devuelve un caracter multibyte. En el párrafo . . . de GNU awk en [[http://www.gnu.org/software/gawk/manual/html_node/Escape-Sequences.html|section . . . de cape tienen un número correspondiente. gawk tiene como característica [[http://www.gnu.org/software/gawk/manual/html_node/Printf-Ordering.html|una . . .
4K - last updated 2009-01-15 20:03 UTC by fcr
operator
The [[awk]] programming language provides a series of *operators* that allow [[value]]s and [[variable]]s . . . but equivalent functions are available as [[gawkism]]s * [[concatenation]] operators * [[exponent]] . . . awk implementations, but is available as a [[gawkism]] * [[repetition]] operator ---- [[precedence]] . . .
3K - last updated 2011-05-24 22:19 UTC by markhobley
PassingAnArray
* You can use split to create an array from a string: {{{ sh awk -v list='foo,bar,baz' ' BEGIN { n=split(list, . . . 2 * FNR || result + 0) } ' file1 file2 }}} With gawk one could use {{{ARGIND == 1}}} instead of {{{NR . . .
1K - last updated 2009-04-13 22:51 UTC by goedel
PrimeNumberSieve
This is the standard sieve of Eratosthenes implemented in portable awk. The running time of the bare . . . to be distinguishable from timing error. ==== gawk 3.1.5 |=algorithm|=10,000|=20,000|=30,000|=32,767|=1,000,000| . . .
4K - last updated 2008-06-19 05:56 UTC by gnomon
PrintASingleQuote
This question gets asked often enough that it deserves its own answer. This common question doesn't actually . . . is a sham. Try the following fragment instead in gawk, mawk and busybox awk and compare the results: . . . awk print the expected string, but that [[gawk]] returns a [[multibyte]] character. As mentioned . . . GNU awk manual in [[http://www.gnu.org/software/gawk/manual/html_node/Escape-Sequences.html|section . . . sequence]]s have a corresponding number. gawk features [[http://www.gnu.org/software/gawk/manual/html_node/Printf-Ordering.html|a . . .
5K - last updated 2015-07-05 09:45 UTC by pitman
PrintASingleQuoteJapanese
This page is the translated page of PrintASingleQuote written in Japanese. この問題は何度も質問される内容なので、議論するのに値する問題です。 . . . returned 0";exit 0}' }}} ・・・でも、この一貫性は偽りなのです。 gawk, mawk や busybox の awk で以下の断片を実行して、結果を比較してみてください。 . . . }}} mawk と buxybox の awk は予想通りの文字列を表示しますが、gawk はマルチバイト文字を出力することに注意してください。 [[http://www.opengroup.org/onlinepubs/009695399/utilities/awk.html#tag_04_06_18|Open . . . awk のマニュアルの [[http://www.gnu.org/software/gawk/manual/html_node/Escape-Sequences.html|section . . . gawk は文字列シーケンスの中の特定の位置によって printf の引数が再利用されるという特徴 [[http://www.gnu.org/software/gawk/manual/html_node/Printf-Ordering.html|a . . .
3K - last updated 2008-10-15 14:22 UTC by hi saito
PrintingNumbers
Use printf and a format string instead of print, some examples: {{{ awk BEGIN { printf "%f", 1000001.10 . . . about printf see [[http://www.gnu.org/software/gawk/manual/html_node/Printf.html#Printf|the gnu awk . . .
2K - last updated 2009-03-04 12:34 UTC by pgas
RangeOfFields
Printing a range of fields - all fields but the first, for examples, or fields 3 through 8 - is a surprisingly . . . to anyone reading the command line. ==== With gawk-devel's optional fourth parameter of split() To . . . field with [[http://cvs.savannah.gnu.org/viewvc/gawk-devel/?root=gawk|gawk-devel]]'s {{{split()}}}, . . .
10K - last updated 2015-09-08 09:52 UTC by pgas
ReadDirectory
Getting a list of files in a directory is a tricky process. One might be tempted to try use ls and getline, . . . when storing the files to get a fuller path. In gawk, RS can be a regex and can contain null. This . . . in the entire list at once (dependent on RAM as gawk can read lines longer than the LINE_MAX that POSIX . . .
2K - last updated 2013-10-03 22:35 UTC by emg
Removing gawkisms from buggy build scripts
The use of awk gawkisms will prevent the script from running correctly on systems that use a traditional . . . assume that the [[awk]] interpreter is [[gawk]] and utilize [[gawkism]]s in their build and . . .
1K - last updated 2010-10-10 20:34 UTC by markhobley
RepeatAString
Sometimes it is useful to have something like Perl's 'x' operator, which repeats a string N times. This . . . is recursive, but performs very well under mawk, gawk and busybox awk. There are many other possible . . .
1K - last updated 2009-03-01 19:15 UTC by h-67-101-152-180.nycmny83.dynamic.covad.net
SplitIntoChars
In portable POSIX awk, the only way to do this is to use substr to pull out each character, one by one. . . . This is painful. However, gawk, mawk, and the newest version of the Bell Labs . . .
1K - last updated 2008-11-24 08:20 UTC by pgas
SplitIntoCharsJapanese
In portable POSIX awk, the only way to do this is to use substr to pull out each character, one by one. . . . This is painful. However, gawk, mawk, and the newest version of the Bell Labs . . .
1K - last updated 2008-11-24 08:35 UTC by pgas
text.2.wiki.awk
#: C:\#\awk\lib\text.2.wiki.awk\\ . . . %gawk% --lint -f C:\#\awk\lib\text.2.wiki.awk . . .
11K - last updated 2012-09-24 14:55 UTC by g0ph3r
tracert.awk
{{{ awk #:: C:\_\_u\tracert.awk #: 2014-07-06 19:47:02 #:: rod.t_2014 #:: extract basename for tracert . . . = "CON:"; _awk = tolower(_awk); if((_awk !~ "gawk") && \ (_awk !~ "mawk")) \ sysmul = 256; . . .
4K - last updated 2014-07-07 06:15 UTC by 212.205.56.222
truth
== Boolean Truth == A **boolean [[expression]]** has only two outcomes: **true** or **false**. In [[awk]], . . . awk and /usr/xpg4/bin/awk on solaris: {{{ sh gawk 'BEGIN{var="0"; foo=var+0;if (var){ print "true"}else{print . . .
3K - last updated 2013-02-20 17:34 UTC by markhobley
VariablesInRegex
The patterns between slashes like /pattern/ are called **ERE constants**, or **regular expressions literals**. . . . using them, see [[http://www.gnu.org/software/gawk/manual/gawk.html#Computed-Regexps|the GNU awk . . .
2K - last updated 2010-11-26 08:49 UTC by 195.97.26.99
WartAndWishList
Awk is a wonderful language! That said, there are a few annoying bits... == The Good * well-documented . . . of split in [[http://cvs.savannah.gnu.org/viewvc/gawk-devel/?root=gawk|gawk-devel]]). * Some strings . . . pattern)}}} built-in function is jarring. The gawk manual mentions that it may be easier to remember . . . things get [http://www.gnu.org/software/gawk/manual/gawk.html#Gory-Details|real ugly real fast]. . . . calls in [[http://cvs.savannah.gnu.org/viewvc/gawk-devel/?root=gawk|gawk-devel]]). * The language . . .
7K - last updated 2009-04-13 18:39 UTC by goedel
What is awk
awk is an extraction and reporting language, named after its three original authors: * Alfred V. **A**ho . . . language as it is currently known and loved. # gawk came to be sometime around 1986 according to the . . . [[http://www.gnu.org/software/gawk/manual/|gawk-manual]]; in any case, it is still . . . hosts [[https://savannah.gnu.org/cvs/?group=gawk|CVS repositories]] for both the stable version . . . and the development version (3.2.0 or 4.x; the gawk maintainer hasn't decided yet). # 1991: Mike Brennan . . .
5K - last updated 2014-11-28 08:24 UTC by pgas
Which version of awk should I choose
This is a comparison between the original [awk] package and other variants. | | [[awk]] | [[bwk]] | [[gawk]] . . .
1K - last updated 2011-08-13 20:50 UTC by 92.40.253.96.threembb.co.uk
70 pages found.