CINXE.COM
AWK - Wikipedia
<!DOCTYPE html> <html class="client-nojs skin-theme-clientpref-day mf-expand-sections-clientpref-0 mf-font-size-clientpref-small mw-mf-amc-clientpref-0" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>AWK - Wikipedia</title> <script>(function(){var className="client-js skin-theme-clientpref-day mf-expand-sections-clientpref-0 mf-font-size-clientpref-small mw-mf-amc-clientpref-0";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"155b3396-94c3-42cc-8f3c-6b75255e2786","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"AWK","wgTitle":"AWK","wgCurRevisionId":1282366375,"wgRevisionId":1282366375,"wgArticleId":1456,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"AWK","wgRelevantArticleId":1456,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFMode":"stable","wgMFAmc":false,"wgMFAmcOutreachActive":false,"wgMFAmcOutreachUserEligible":false,"wgMFLazyLoadImages":true,"wgMFEditNoticesFeatureConflict":false,"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgMFIsSupportedEditRequest":true,"wgMFScriptPath":"","wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":40000,"wgEditSubmitButtonLabelPublish":true,"wgSectionTranslationMissingLanguages":[{"lang":"ab","autonym":"аԥсшәа","dir":"ltr"},{"lang":"ace","autonym":"Acèh","dir":"ltr"},{"lang":"ady","autonym":"адыгабзэ","dir":"ltr"},{"lang":"af","autonym":"Afrikaans","dir":"ltr"},{"lang":"alt","autonym":"алтай тил","dir":"ltr"},{"lang":"am","autonym":"አማርኛ","dir":"ltr"},{"lang":"ami","autonym":"Pangcah","dir":"ltr"},{"lang":"ang","autonym":"Ænglisc","dir":"ltr"},{"lang":"ann","autonym":"Obolo","dir":"ltr"},{"lang":"anp","autonym":"अंगिका","dir":"ltr"},{"lang":"arc","autonym":"ܐܪܡܝܐ","dir":"rtl"},{"lang":"ary","autonym":"الدارجة","dir":"rtl"},{"lang":"arz","autonym":"مصرى","dir":"rtl"},{"lang":"as","autonym":"অসমীয়া","dir":"ltr"},{"lang":"atj","autonym":"Atikamekw","dir":"ltr"},{"lang":"av","autonym":"авар","dir":"ltr"},{"lang":"avk","autonym":"Kotava","dir":"ltr"},{"lang":"awa","autonym":"अवधी","dir":"ltr"},{"lang":"ay","autonym":"Aymar aru","dir":"ltr"},{"lang":"az","autonym":"azərbaycanca","dir":"ltr"},{"lang":"azb","autonym":"تۆرکجه","dir":"rtl"},{"lang":"ba","autonym":"башҡортса","dir":"ltr"},{"lang":"ban","autonym":"Basa Bali","dir":"ltr"},{"lang":"bar","autonym":"Boarisch","dir":"ltr"},{"lang":"bbc","autonym":"Batak Toba","dir":"ltr"},{"lang":"bcl","autonym":"Bikol Central","dir":"ltr"},{"lang":"bdr","autonym":"Bajau Sama","dir":"ltr"},{"lang":"be","autonym":"беларуская","dir":"ltr"},{"lang":"be-tarask","autonym":"беларуская (тарашкевіца)","dir":"ltr"},{"lang":"bew","autonym":"Betawi","dir":"ltr"},{"lang":"bho","autonym":"भोजपुरी","dir":"ltr"},{"lang":"bi","autonym":"Bislama","dir":"ltr"},{"lang":"bjn","autonym":"Banjar","dir":"ltr"},{"lang":"blk","autonym":"ပအိုဝ်ႏဘာႏသာႏ","dir":"ltr"},{"lang":"bm","autonym":"bamanankan","dir":"ltr"},{"lang":"bn","autonym":"বাংলা","dir":"ltr"},{"lang":"bo","autonym":"བོད་ཡིག","dir":"ltr"},{"lang":"bpy","autonym":"বিষ্ণুপ্রিয়া মণিপুরী","dir":"ltr"},{"lang":"br","autonym":"brezhoneg","dir":"ltr"},{"lang":"btm","autonym":"Batak Mandailing","dir":"ltr"},{"lang":"bug","autonym":"Basa Ugi","dir":"ltr"},{"lang":"bxr","autonym":"буряад","dir":"ltr"},{"lang":"cbk-zam","autonym":"Chavacano de Zamboanga","dir":"ltr"},{"lang":"cdo","autonym":"閩東語 / Mìng-dĕ̤ng-ngṳ̄","dir":"ltr"},{"lang":"ce","autonym":"нохчийн","dir":"ltr"},{"lang":"ceb","autonym":"Cebuano","dir":"ltr"},{"lang":"ch","autonym":"Chamoru","dir":"ltr"},{"lang":"chr","autonym":"ᏣᎳᎩ","dir":"ltr"},{"lang":"chy","autonym":"Tsetsêhestâhese","dir":"ltr"},{"lang":"ckb","autonym":"کوردی","dir":"rtl"},{"lang":"co","autonym":"corsu","dir":"ltr"},{"lang":"cr","autonym":"Nēhiyawēwin / ᓀᐦᐃᔭᐍᐏᐣ","dir":"ltr"},{"lang":"crh","autonym":"qırımtatarca","dir":"ltr"},{"lang":"csb","autonym":"kaszëbsczi","dir":"ltr"},{"lang":"cu","autonym":"словѣньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ","dir":"ltr"},{"lang":"cv","autonym":"чӑвашла","dir":"ltr"},{"lang":"cy","autonym":"Cymraeg","dir":"ltr"},{"lang":"dag","autonym":"dagbanli","dir":"ltr"},{"lang":"dga","autonym":"Dagaare","dir":"ltr"},{"lang":"din","autonym":"Thuɔŋjäŋ","dir":"ltr"},{"lang":"diq","autonym":"Zazaki","dir":"ltr"},{"lang":"dsb","autonym":"dolnoserbski","dir":"ltr"},{"lang":"dtp","autonym":"Kadazandusun","dir":"ltr"},{"lang":"dty","autonym":"डोटेली","dir":"ltr"},{"lang":"dv","autonym":"ދިވެހިބަސް","dir":"rtl"},{"lang":"dz","autonym":"ཇོང་ཁ","dir":"ltr"},{"lang":"ee","autonym":"eʋegbe","dir":"ltr"},{"lang":"eml","autonym":"emiliàn e rumagnòl","dir":"ltr"},{"lang":"eo","autonym":"Esperanto","dir":"ltr"},{"lang":"eu","autonym":"euskara","dir":"ltr"},{"lang":"ext","autonym":"estremeñu","dir":"ltr"},{"lang":"fat","autonym":"mfantse","dir":"ltr"},{"lang":"ff","autonym":"Fulfulde","dir":"ltr"},{"lang":"fj","autonym":"Na Vosa Vakaviti","dir":"ltr"},{"lang":"fo","autonym":"føroyskt","dir":"ltr"},{"lang":"fon","autonym":"fɔ̀ngbè","dir":"ltr"},{"lang":"frp","autonym":"arpetan","dir":"ltr"},{"lang":"frr","autonym":"Nordfriisk","dir":"ltr"},{"lang":"fur","autonym":"furlan","dir":"ltr"},{"lang":"fy","autonym":"Frysk","dir":"ltr"},{"lang":"ga","autonym":"Gaeilge","dir":"ltr"},{"lang":"gag","autonym":"Gagauz","dir":"ltr"},{"lang":"gan","autonym":"贛語","dir":"ltr"},{"lang":"gcr","autonym":"kriyòl gwiyannen","dir":"ltr"},{"lang":"gd","autonym":"Gàidhlig","dir":"ltr"},{"lang":"glk","autonym":"گیلکی","dir":"rtl"},{"lang":"gn","autonym":"Avañe'ẽ","dir":"ltr"},{"lang":"gom","autonym":"गोंयची कोंकणी / Gõychi Konknni","dir":"ltr"},{"lang":"gor","autonym":"Bahasa Hulontalo","dir":"ltr"},{"lang":"got","autonym":"𐌲𐌿𐍄𐌹𐍃𐌺","dir":"ltr"},{"lang":"gpe","autonym":"Ghanaian Pidgin","dir":"ltr"},{"lang":"gsw","autonym":"Alemannisch","dir":"ltr"},{"lang":"gu","autonym":"ગુજરાતી","dir":"ltr"},{"lang":"guc","autonym":"wayuunaiki","dir":"ltr"},{"lang":"gur","autonym":"farefare","dir":"ltr"},{"lang":"guw","autonym":"gungbe","dir":"ltr"},{"lang":"gv","autonym":"Gaelg","dir":"ltr"},{"lang":"ha","autonym":"Hausa","dir":"ltr"},{"lang":"hak","autonym":"客家語 / Hak-kâ-ngî","dir":"ltr"},{"lang":"haw","autonym":"Hawaiʻi","dir":"ltr"},{"lang":"hi","autonym":"हिन्दी","dir":"ltr"},{"lang":"hif","autonym":"Fiji Hindi","dir":"ltr"},{"lang":"hsb","autonym":"hornjoserbsce","dir":"ltr"},{"lang":"ht","autonym":"Kreyòl ayisyen","dir":"ltr"},{"lang":"hyw","autonym":"Արեւմտահայերէն","dir":"ltr"},{"lang":"ia","autonym":"interlingua","dir":"ltr"},{"lang":"iba","autonym":"Jaku Iban","dir":"ltr"},{"lang":"id","autonym":"Bahasa Indonesia","dir":"ltr"},{"lang":"ie","autonym":"Interlingue","dir":"ltr"},{"lang":"ig","autonym":"Igbo","dir":"ltr"},{"lang":"igl","autonym":"Igala","dir":"ltr"},{"lang":"ik","autonym":"Iñupiatun","dir":"ltr"},{"lang":"ilo","autonym":"Ilokano","dir":"ltr"},{"lang":"inh","autonym":"гӀалгӀай","dir":"ltr"},{"lang":"io","autonym":"Ido","dir":"ltr"},{"lang":"is","autonym":"íslenska","dir":"ltr"},{"lang":"iu","autonym":"ᐃᓄᒃᑎᑐᑦ / inuktitut","dir":"ltr"},{"lang":"jam","autonym":"Patois","dir":"ltr"},{"lang":"jbo","autonym":"la .lojban.","dir":"ltr"},{"lang":"jv","autonym":"Jawa","dir":"ltr"},{"lang":"ka","autonym":"ქართული","dir":"ltr"},{"lang":"kaa","autonym":"Qaraqalpaqsha","dir":"ltr"},{"lang":"kab","autonym":"Taqbaylit","dir":"ltr"},{"lang":"kbd","autonym":"адыгэбзэ","dir":"ltr"},{"lang":"kbp","autonym":"Kabɩyɛ","dir":"ltr"},{"lang":"kcg","autonym":"Tyap","dir":"ltr"},{"lang":"kg","autonym":"Kongo","dir":"ltr"},{"lang":"kge","autonym":"Kumoring","dir":"ltr"},{"lang":"ki","autonym":"Gĩkũyũ","dir":"ltr"},{"lang":"kk","autonym":"қазақша","dir":"ltr"},{"lang":"kl","autonym":"kalaallisut","dir":"ltr"},{"lang":"km","autonym":"ភាសាខ្មែរ","dir":"ltr"},{"lang":"kn","autonym":"ಕನ್ನಡ","dir":"ltr"},{"lang":"knc","autonym":"Yerwa Kanuri","dir":"ltr"},{"lang":"koi","autonym":"перем коми","dir":"ltr"},{"lang":"krc","autonym":"къарачай-малкъар","dir":"ltr"},{"lang":"ks","autonym":"कॉशुर / کٲشُر","dir":"rtl"},{"lang":"ksh","autonym":"Ripoarisch","dir":"ltr"},{"lang":"ku","autonym":"kurdî","dir":"ltr"},{"lang":"kus","autonym":"Kʋsaal","dir":"ltr"},{"lang":"kv","autonym":"коми","dir":"ltr"},{"lang":"kw","autonym":"kernowek","dir":"ltr"},{"lang":"ky","autonym":"кыргызча","dir":"ltr"},{"lang":"la","autonym":"Latina","dir":"ltr"},{"lang":"lad","autonym":"Ladino","dir":"ltr"},{"lang":"lb","autonym":"Lëtzebuergesch","dir":"ltr"},{"lang":"lbe","autonym":"лакку","dir":"ltr"},{"lang":"lez","autonym":"лезги","dir":"ltr"},{"lang":"lfn","autonym":"Lingua Franca Nova","dir":"ltr"},{"lang":"lg","autonym":"Luganda","dir":"ltr"},{"lang":"li","autonym":"Limburgs","dir":"ltr"},{"lang":"lij","autonym":"Ligure","dir":"ltr"},{"lang":"lld","autonym":"Ladin","dir":"ltr"},{"lang":"lmo","autonym":"lombard","dir":"ltr"},{"lang":"ln","autonym":"lingála","dir":"ltr"},{"lang":"lo","autonym":"ລາວ","dir":"ltr"},{"lang":"lt","autonym":"lietuvių","dir":"ltr"},{"lang":"ltg","autonym":"latgaļu","dir":"ltr"},{"lang":"lzh","autonym":"文言","dir":"ltr"},{"lang":"mad","autonym":"Madhurâ","dir":"ltr"},{"lang":"mai","autonym":"मैथिली","dir":"ltr"},{"lang":"map-bms","autonym":"Basa Banyumasan","dir":"ltr"},{"lang":"mdf","autonym":"мокшень","dir":"ltr"},{"lang":"mg","autonym":"Malagasy","dir":"ltr"},{"lang":"mhr","autonym":"олык марий","dir":"ltr"},{"lang":"mi","autonym":"Māori","dir":"ltr"},{"lang":"min","autonym":"Minangkabau","dir":"ltr"},{"lang":"mk","autonym":"македонски","dir":"ltr"},{"lang":"ml","autonym":"മലയാളം","dir":"ltr"},{"lang":"mn","autonym":"монгол","dir":"ltr"},{"lang":"mni","autonym":"ꯃꯤꯇꯩ ꯂꯣꯟ","dir":"ltr"},{"lang":"mnw","autonym":"ဘာသာမန်","dir":"ltr"},{"lang":"mos","autonym":"moore","dir":"ltr"},{"lang":"mr","autonym":"मराठी","dir":"ltr"},{"lang":"mrj","autonym":"кырык мары","dir":"ltr"},{"lang":"mt","autonym":"Malti","dir":"ltr"},{"lang":"mwl","autonym":"Mirandés","dir":"ltr"},{"lang":"my","autonym":"မြန်မာဘာသာ","dir":"ltr"},{"lang":"myv","autonym":"эрзянь","dir":"ltr"},{"lang":"mzn","autonym":"مازِرونی","dir":"rtl"},{"lang":"nah","autonym":"Nāhuatl","dir":"ltr"},{"lang":"nan","autonym":"閩南語 / Bân-lâm-gú","dir":"ltr"},{"lang":"nap","autonym":"Napulitano","dir":"ltr"},{"lang":"nb","autonym":"norsk bokmål","dir":"ltr"},{"lang":"nds","autonym":"Plattdüütsch","dir":"ltr"},{"lang":"nds-nl","autonym":"Nedersaksies","dir":"ltr"},{"lang":"ne","autonym":"नेपाली","dir":"ltr"},{"lang":"new","autonym":"नेपाल भाषा","dir":"ltr"},{"lang":"nia","autonym":"Li Niha","dir":"ltr"},{"lang":"nov","autonym":"Novial","dir":"ltr"},{"lang":"nqo","autonym":"ߒߞߏ","dir":"rtl"},{"lang":"nr","autonym":"isiNdebele seSewula","dir":"ltr"},{"lang":"nrm","autonym":"Nouormand","dir":"ltr"},{"lang":"nso","autonym":"Sesotho sa Leboa","dir":"ltr"},{"lang":"nv","autonym":"Diné bizaad","dir":"ltr"},{"lang":"ny","autonym":"Chi-Chewa","dir":"ltr"},{"lang":"oc","autonym":"occitan","dir":"ltr"},{"lang":"olo","autonym":"livvinkarjala","dir":"ltr"},{"lang":"om","autonym":"Oromoo","dir":"ltr"},{"lang":"or","autonym":"ଓଡ଼ିଆ","dir":"ltr"},{"lang":"os","autonym":"ирон","dir":"ltr"},{"lang":"pa","autonym":"ਪੰਜਾਬੀ","dir":"ltr"},{"lang":"pag","autonym":"Pangasinan","dir":"ltr"},{"lang":"pam","autonym":"Kapampangan","dir":"ltr"},{"lang":"pap","autonym":"Papiamentu","dir":"ltr"},{"lang":"pcd","autonym":"Picard","dir":"ltr"},{"lang":"pcm","autonym":"Naijá","dir":"ltr"},{"lang":"pdc","autonym":"Deitsch","dir":"ltr"},{"lang":"pfl","autonym":"Pälzisch","dir":"ltr"},{"lang":"pi","autonym":"पालि","dir":"ltr"},{"lang":"pih","autonym":"Norfuk / Pitkern","dir":"ltr"},{"lang":"pms","autonym":"Piemontèis","dir":"ltr"},{"lang":"pnb","autonym":"پنجابی","dir":"rtl"},{"lang":"pnt","autonym":"Ποντιακά","dir":"ltr"},{"lang":"ps","autonym":"پښتو","dir":"rtl"},{"lang":"pwn","autonym":"pinayuanan","dir":"ltr"},{"lang":"qu","autonym":"Runa Simi","dir":"ltr"},{"lang":"rm","autonym":"rumantsch","dir":"ltr"},{"lang":"rmy","autonym":"romani čhib","dir":"ltr"},{"lang":"rn","autonym":"ikirundi","dir":"ltr"},{"lang":"roa-tara","autonym":"tarandíne","dir":"ltr"},{"lang":"rsk","autonym":"руски","dir":"ltr"},{"lang":"rue","autonym":"русиньскый","dir":"ltr"},{"lang":"rup","autonym":"armãneashti","dir":"ltr"},{"lang":"rw","autonym":"Ikinyarwanda","dir":"ltr"},{"lang":"sa","autonym":"संस्कृतम्","dir":"ltr"},{"lang":"sah","autonym":"саха тыла","dir":"ltr"},{"lang":"sat","autonym":"ᱥᱟᱱᱛᱟᱲᱤ","dir":"ltr"},{"lang":"sc","autonym":"sardu","dir":"ltr"},{"lang":"scn","autonym":"sicilianu","dir":"ltr"},{"lang":"sco","autonym":"Scots","dir":"ltr"},{"lang":"sd","autonym":"سنڌي","dir":"rtl"},{"lang":"se","autonym":"davvisámegiella","dir":"ltr"},{"lang":"sg","autonym":"Sängö","dir":"ltr"},{"lang":"sgs","autonym":"žemaitėška","dir":"ltr"},{"lang":"shi","autonym":"Taclḥit","dir":"ltr"},{"lang":"shn","autonym":"တႆး","dir":"ltr"},{"lang":"si","autonym":"සිංහල","dir":"ltr"},{"lang":"skr","autonym":"سرائیکی","dir":"rtl"},{"lang":"sl","autonym":"slovenščina","dir":"ltr"},{"lang":"sm","autonym":"Gagana Samoa","dir":"ltr"},{"lang":"smn","autonym":"anarâškielâ","dir":"ltr"},{"lang":"sn","autonym":"chiShona","dir":"ltr"},{"lang":"so","autonym":"Soomaaliga","dir":"ltr"},{"lang":"sq","autonym":"shqip","dir":"ltr"},{"lang":"srn","autonym":"Sranantongo","dir":"ltr"},{"lang":"ss","autonym":"SiSwati","dir":"ltr"},{"lang":"st","autonym":"Sesotho","dir":"ltr"},{"lang":"stq","autonym":"Seeltersk","dir":"ltr"},{"lang":"su","autonym":"Sunda","dir":"ltr"},{"lang":"sw","autonym":"Kiswahili","dir":"ltr"},{"lang":"syl","autonym":"ꠍꠤꠟꠐꠤ","dir":"ltr"},{"lang":"szl","autonym":"ślůnski","dir":"ltr"},{"lang":"szy","autonym":"Sakizaya","dir":"ltr"},{"lang":"ta","autonym":"தமிழ்","dir":"ltr"},{"lang":"tay","autonym":"Tayal","dir":"ltr"},{"lang":"tcy","autonym":"ತುಳು","dir":"ltr"},{"lang":"tdd","autonym":"ᥖᥭᥰ ᥖᥬᥲ ᥑᥨᥒᥰ","dir":"ltr"},{"lang":"te","autonym":"తెలుగు","dir":"ltr"},{"lang":"tet","autonym":"tetun","dir":"ltr"},{"lang":"ti","autonym":"ትግርኛ","dir":"ltr"},{"lang":"tig","autonym":"ትግሬ","dir":"ltr"},{"lang":"tk","autonym":"Türkmençe","dir":"ltr"},{"lang":"tl","autonym":"Tagalog","dir":"ltr"},{"lang":"tly","autonym":"tolışi","dir":"ltr"},{"lang":"tn","autonym":"Setswana","dir":"ltr"},{"lang":"to","autonym":"lea faka-Tonga","dir":"ltr"},{"lang":"tpi","autonym":"Tok Pisin","dir":"ltr"},{"lang":"trv","autonym":"Seediq","dir":"ltr"},{"lang":"ts","autonym":"Xitsonga","dir":"ltr"},{"lang":"tt","autonym":"татарча / tatarça","dir":"ltr"},{"lang":"tum","autonym":"chiTumbuka","dir":"ltr"},{"lang":"tw","autonym":"Twi","dir":"ltr"},{"lang":"ty","autonym":"reo tahiti","dir":"ltr"},{"lang":"tyv","autonym":"тыва дыл","dir":"ltr"},{"lang":"udm","autonym":"удмурт","dir":"ltr"},{"lang":"ug","autonym":"ئۇيغۇرچە / Uyghurche","dir":"rtl"},{"lang":"ur","autonym":"اردو","dir":"rtl"},{"lang":"uz","autonym":"oʻzbekcha / ўзбекча","dir":"ltr"},{"lang":"ve","autonym":"Tshivenda","dir":"ltr"},{"lang":"vec","autonym":"vèneto","dir":"ltr"},{"lang":"vep","autonym":"vepsän kel’","dir":"ltr"},{"lang":"vls","autonym":"West-Vlams","dir":"ltr"},{"lang":"vo","autonym":"Volapük","dir":"ltr"},{"lang":"vro","autonym":"võro","dir":"ltr"},{"lang":"wa","autonym":"walon","dir":"ltr"},{"lang":"war","autonym":"Winaray","dir":"ltr"},{"lang":"wo","autonym":"Wolof","dir":"ltr"},{"lang":"wuu","autonym":"吴语","dir":"ltr"},{"lang":"xal","autonym":"хальмг","dir":"ltr"},{"lang":"xh","autonym":"isiXhosa","dir":"ltr"},{"lang":"xmf","autonym":"მარგალური","dir":"ltr"},{"lang":"yi","autonym":"ייִדיש","dir":"rtl"},{"lang":"yo","autonym":"Yorùbá","dir":"ltr"},{"lang":"yue","autonym":"粵語","dir":"ltr"},{"lang":"za","autonym":"Vahcuengh","dir":"ltr"},{"lang":"zea","autonym":"Zeêuws","dir":"ltr"},{"lang":"zgh","autonym":"ⵜⴰⵎⴰⵣⵉⵖⵜ ⵜⴰⵏⴰⵡⴰⵢⵜ","dir":"ltr"},{"lang":"zu","autonym":"isiZulu","dir":"ltr"}],"wgSectionTranslationTargetLanguages":["ab","ace","ady","af","alt","am","ami","an","ang","ann","anp","ar","arc","ary","arz","as","ast","atj","av","avk","awa","ay","az","azb","ba","ban","bar","bbc","bcl","bdr","be","be-tarask","bew","bg","bho","bi","bjn","blk","bm","bn","bo","bpy","br","bs","btm","bug","bxr","ca","cbk-zam","cdo","ce","ceb","ch","chr","chy","ckb","co","cr","crh","cs","csb","cu","cv","cy","da","dag","de","dga","din","diq","dsb","dtp","dty","dv","dz","ee","el","eml","en","eo","es","et","eu","ext","fa","fat","ff","fi","fj","fo","fon","fr","frp","frr","fur","fy","ga","gag","gan","gcr","gd","gl","glk","gn","gom","gor","got","gpe","gsw","gu","guc","gur","guw","gv","ha","hak","haw","he","hi","hif","hr","hsb","ht","hu","hy","hyw","ia","iba","id","ie","ig","igl","ik","ilo","inh","io","is","it","iu","ja","jam","jbo","jv","ka","kaa","kab","kbd","kbp","kcg","kg","kge","ki","kk","kl","km","kn","knc","ko","koi","krc","ks","ksh","ku","kus","kv","kw","ky","la","lad","lb","lbe","lez","lfn","lg","li","lij","lld","lmo","ln","lo","lt","ltg","lv","lzh","mad","mai","map-bms","mdf","mg","mhr","mi","min","mk","ml","mn","mni","mnw","mos","mr","mrj","ms","mt","mwl","my","myv","mzn","nah","nan","nap","nb","nds","nds-nl","ne","new","nia","nl","nn","nov","nqo","nr","nrm","nso","nv","ny","oc","olo","om","or","os","pa","pag","pam","pap","pcd","pcm","pdc","pfl","pi","pih","pl","pms","pnb","pnt","ps","pt","pwn","qu","rm","rmy","rn","ro","roa-tara","rsk","ru","rue","rup","rw","sa","sah","sat","sc","scn","sco","sd","se","sg","sgs","sh","shi","shn","si","simple","sk","skr","sl","sm","smn","sn","so","sq","sr","srn","ss","st","stq","su","sv","sw","syl","szl","szy","ta","tay","tcy","tdd","te","tet","tg","th","ti","tig","tk","tl","tly","tn","to","tpi","tr","trv","ts","tt","tum","tw","ty","tyv","udm","ug","uk","ur","uz","ve","vec","vep","vi","vls","vo","vro","wa","war","wo","wuu","xal","xh","xmf","yi","yo","yue","za","zea","zgh","zh","zu"],"isLanguageSearcherCXEntrypointEnabled":true,"mintEntrypointLanguages":["tn","vec"],"wgWikibaseItemId":"Q213970","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGELevelingUpEnabledForUser":false,"wgMinervaPermissions":{"watchable":true,"watch":false},"wgMinervaFeatures":{"beta":false,"donateBanner":true,"donate":false,"mobileOptionsLink":true,"categories":false,"pageIssues":true,"talkAtTop":true,"historyInPageActions":false,"overflowSubmenu":false,"tabsOnSpecials":true,"personalMenu":false,"mainMenuExpanded":false,"echo":true,"nightMode":true},"wgMinervaDownloadNamespaces":[0]}; RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.pygments":"ready","skins.minerva.styles":"ready","skins.minerva.content.styles.images":"ready","mediawiki.hlist":"ready","skins.minerva.codex.styles":"ready","skins.minerva.icons":"ready","skins.minerva.amc.styles":"ready","ext.wikimediamessages.styles":"ready","mobile.init.styles":"ready","ext.relatedArticles.styles":"ready","wikibase.client.init":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","ext.pygments.view","mediawiki.page.media","site","mediawiki.page.ready","skins.minerva.scripts","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","ext.popups","mobile.init","ext.echo.centralauth","ext.relatedArticles.readMore.bootstrap","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.cx.eventlogging.campaigns","ext.cx.entrypoints.mffrequentlanguages","ext.cx.entrypoints.languagesearcher.init","mw.externalguidance.init","ext.checkUser.clientHints","ext.quicksurveys.init","ext.growthExperiments.SuggestedEditSession"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.cite.styles%7Cext.pygments%7Cext.relatedArticles.styles%7Cext.wikimediamessages.styles%7Cmediawiki.hlist%7Cmobile.init.styles%7Cskins.minerva.amc.styles%7Cskins.minerva.codex.styles%7Cskins.minerva.content.styles.images%7Cskins.minerva.icons%2Cstyles%7Cwikibase.client.init&only=styles&skin=minerva"> <script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=minerva"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=minerva"> <meta name="generator" content="MediaWiki 1.44.0-wmf.23"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="theme-color" content="#eaecf0"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/The-AWK-Programming-Language.svg/1200px-The-AWK-Programming-Language.svg.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="600"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/The-AWK-Programming-Language.svg/800px-The-AWK-Programming-Language.svg.png"> <meta property="og:image:width" content="800"> <meta property="og:image:height" content="400"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/The-AWK-Programming-Language.svg/640px-The-AWK-Programming-Language.svg.png"> <meta property="og:image:width" content="640"> <meta property="og:image:height" content="320"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes, minimum-scale=0.25, maximum-scale=5.0"> <meta property="og:title" content="AWK - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="manifest" href="/w/api.php?action=webapp-manifest"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=AWK&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/AWK"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="auth.wikimedia.org"> </head> <body class="mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-AWK rootpage-AWK stable issues-group-B skin-minerva action-view skin--responsive mw-mf-amc-disabled mw-mf"><div id="mw-mf-viewport"> <div id="mw-mf-page-center"> <a class="mw-mf-page-center__mask" href="#"></a> <header class="header-container header-chrome"> <div class="minerva-header"> <nav class="navigation-drawer toggle-list view-border-box"> <input type="checkbox" id="main-menu-input" data-event-name="ui.mainmenu" class="toggle-list__checkbox" role="button" aria-haspopup="true" aria-expanded="false" aria-labelledby="mw-mf-main-menu-button"> <label for="main-menu-input" id="mw-mf-main-menu-button" aria-hidden="true" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet toggle-list__toggle"> <span class="minerva-icon minerva-icon--menu"></span> <span></span> </label> <div id="mw-mf-page-left" class="menu view-border-box"> <ul id="p-navigation" class="toggle-list__list"> <li class="toggle-list-item "> <a class="toggle-list-item__anchor menu__item--home" href="/wiki/Main_Page" data-mw="interface"> <span class="minerva-icon minerva-icon--home"></span> <span class="toggle-list-item__label">Home</span> </a> </li> <li class="toggle-list-item "> <a class="toggle-list-item__anchor menu__item--random" href="/wiki/Special:Random" data-mw="interface"> <span class="minerva-icon minerva-icon--die"></span> <span class="toggle-list-item__label">Random</span> </a> </li> <li class="toggle-list-item skin-minerva-list-item-jsonly"> <a class="toggle-list-item__anchor menu__item--nearby" href="/wiki/Special:Nearby" data-event-name="menu.nearby" data-mw="interface"> <span class="minerva-icon minerva-icon--mapPin"></span> <span class="toggle-list-item__label">Nearby</span> </a> </li> </ul> <ul id="p-personal" class="toggle-list__list"> <li class="toggle-list-item "> <a class="toggle-list-item__anchor mw-list-item menu__item--login" href="/w/index.php?title=Special:UserLogin&returnto=AWK" data-event-name="menu.login" data-mw="interface"> <span class="minerva-icon minerva-icon--logIn"></span> <span class="toggle-list-item__label">Log in</span> </a> </li> </ul> <ul id="pt-preferences" class="toggle-list__list"> <li class="toggle-list-item skin-minerva-list-item-jsonly"> <a class="toggle-list-item__anchor menu__item--settings" href="/w/index.php?title=Special:MobileOptions&returnto=AWK" data-event-name="menu.settings" data-mw="interface"> <span class="minerva-icon minerva-icon--settings"></span> <span class="toggle-list-item__label">Settings</span> </a> </li> </ul> <div class="donate-banner"> <a href="https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=en.wikipedia.org&uselang=en" class="donate-banner__link" data-event-name="menu.donateBanner"> <div class="donate-banner__text-container"> <span class="donate-banner__text">Donate Now</span> <span class="donate-banner__subtitle">If Wikipedia is useful to you, please give today.</span> </div> <picture> <source srcset="https://en.wikipedia.org/static/images/donate/donate.png" media="(prefers-reduced-motion)" /> <img src="https://en.wikipedia.org/static/images/donate/donate.gif" alt="" class="donate-banner__gif" loading="lazy"> </picture> </a> </div> <ul class="hlist"> <li class="toggle-list-item "> <a class="toggle-list-item__anchor menu__item--about" href="/wiki/Wikipedia:About" data-mw="interface"> <span class="toggle-list-item__label">About Wikipedia</span> </a> </li> <li class="toggle-list-item "> <a class="toggle-list-item__anchor menu__item--disclaimers" href="/wiki/Wikipedia:General_disclaimer" data-mw="interface"> <span class="toggle-list-item__label">Disclaimers</span> </a> </li> </ul> </div> <label class="main-menu-mask" for="main-menu-input"></label> </nav> <div class="branding-box"> <a href="/wiki/Main_Page"> <span><img src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" alt="Wikipedia" width="120" height="18" style="width: 7.5em; height: 1.125em;"/> </span> </a> </div> <form action="/w/index.php" method="get" class="minerva-search-form"> <div class="search-box"> <input type="hidden" name="title" value="Special:Search"/> <input class="search skin-minerva-search-trigger" id="searchInput" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f"> <span class="search-box-icon-overlay"><span class="minerva-icon minerva-icon--search"></span> </span> </div> <button id="searchIcon" class="cdx-button cdx-button--size-large cdx-button--icon-only cdx-button--weight-quiet skin-minerva-search-trigger"> <span class="minerva-icon minerva-icon--search"></span> <span>Search</span> </button> </form> <nav class="minerva-user-navigation" aria-label="User navigation"> </nav> </div> </header> <main id="content" class="mw-body"> <div class="banner-container"> <div id="siteNotice"></div> </div> <div class="pre-content heading-holder"> <div class="page-heading"> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">AWK</span></h1> <div class="tagline"></div> </div> <ul id="p-associated-pages" class="minerva__tab-container"> <li class="minerva__tab selected mw-list-item"> <a class="minerva__tab-text" href="/wiki/AWK" rel="" data-event-name="tabs.main">Article</a> </li> <li class="minerva__tab mw-list-item"> <a class="minerva__tab-text" href="/wiki/Talk:AWK" rel="discussion" data-event-name="tabs.talk">Talk</a> </li> </ul> <nav class="page-actions-menu"> <ul id="p-views" class="page-actions-menu__list minerva-icon-only-menu"> <li id="language-selector" class="page-actions-menu__list-item"> <a role="button" href="#p-lang" data-mw="interface" data-event-name="menu.languages" title="Language" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet language-selector"> <span class="minerva-icon minerva-icon--language"></span> <span>Language</span> </a> </li> <li id="page-actions-watch" class="page-actions-menu__list-item"> <a role="button" id="ca-watch" href="/w/index.php?title=Special:UserLogin&returnto=AWK" data-event-name="menu.watch" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet menu__item--page-actions-watch"> <span class="minerva-icon minerva-icon--star"></span> <span>Watch</span> </a> </li> <li id="page-actions-edit" class="page-actions-menu__list-item"> <a role="button" id="ca-edit" href="/w/index.php?title=AWK&action=edit" data-event-name="menu.edit" data-mw="interface" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet edit-page menu__item--page-actions-edit"> <span class="minerva-icon minerva-icon--edit"></span> <span>Edit</span> </a> </li> </ul> </nav> <!-- version 1.0.2 (change every time you update a partial) --> <div id="mw-content-subtitle"></div> </div> <div id="bodyContent" class="content"> <div id="mw-content-text" class="mw-body-content"><script>function mfTempOpenSection(id){var block=document.getElementById("mf-section-"+id);block.className+=" open-block";block.previousSibling.className+=" open-block";}</script><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><section class="mf-section-0" id="mf-section-0"> <style data-mw-deduplicate="TemplateStyles:r1236090951">.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}</style><div role="note" class="hatnote navigation-not-searchable">This article is about the programming language. For other uses, see <a href="/wiki/AWK_(disambiguation)" class="mw-disambig" title="AWK (disambiguation)">AWK (disambiguation)</a>.</div> <style data-mw-deduplicate="TemplateStyles:r1257001546">.mw-parser-output .infobox-subbox{padding:0;border:none;margin:-3px;width:auto;min-width:100%;font-size:100%;clear:none;float:none;background-color:transparent}.mw-parser-output .infobox-3cols-child{margin:auto}.mw-parser-output .infobox .navbar{font-size:100%}@media screen{html.skin-theme-clientpref-night .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .infobox-full-data:not(.notheme) div:not(.notheme){background:#1f1f23!important;color:#f8f9fa}}@media(min-width:640px){body.skin--responsive .mw-parser-output .infobox-table{display:table!important}body.skin--responsive .mw-parser-output .infobox-table>caption{display:table-caption!important}body.skin--responsive .mw-parser-output .infobox-table>tbody{display:table-row-group}body.skin--responsive .mw-parser-output .infobox-table tr{display:table-row!important}body.skin--responsive .mw-parser-output .infobox-table th,body.skin--responsive .mw-parser-output .infobox-table td{padding-left:inherit;padding-right:inherit}}</style><p><b>AWK</b> (<span class="rt-commentedText nowrap"><span class="IPA nopopups noexcerpt" lang="en-fonipa"><a href="/wiki/Help:IPA/English" title="Help:IPA/English">/<span style="border-bottom:1px dotted"><span title="/ɔː/: 'au' in 'fraud'">ɔː</span><span title="'k' in 'kind'">k</span></span>/</a></span></span><sup id="cite_ref-awkLC.DR_4-0" class="reference"><a href="#cite_note-awkLC.DR-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>) is a <a href="/wiki/Domain-specific_language" title="Domain-specific language">domain-specific language</a> designed for text processing and typically used as a <a href="/wiki/Data_extraction" title="Data extraction">data extraction</a> and reporting tool. Like <a href="/wiki/Sed" title="Sed">sed</a> and <a href="/wiki/Grep" title="Grep">grep</a>, it is a <a href="/wiki/Filter_(software)" title="Filter (software)">filter</a>,<sup id="cite_ref-awkLC.DR_4-1" class="reference"><a href="#cite_note-awkLC.DR-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> and it is a standard feature of most <a href="/wiki/Unix-like" title="Unix-like">Unix-like operating systems</a>. </p><table class="infobox vevent"><caption class="infobox-title summary">AWK</caption><tbody><tr><td colspan="2" class="infobox-image"><span typeof="mw:File"><a href="/wiki/File:The-AWK-Programming-Language.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/d/d5/The-AWK-Programming-Language.svg/250px-The-AWK-Programming-Language.svg.png" decoding="async" width="200" height="100" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/d/d5/The-AWK-Programming-Language.svg/330px-The-AWK-Programming-Language.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/d/d5/The-AWK-Programming-Language.svg/500px-The-AWK-Programming-Language.svg.png 2x" data-file-width="638" data-file-height="319"></a></span></td></tr><tr><td colspan="2" class="infobox-image"><span typeof="mw:File"><a href="/wiki/File:Awk-example-usage-gimp.gif" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/2/2d/Awk-example-usage-gimp.gif/250px-Awk-example-usage-gimp.gif" decoding="async" width="250" height="146" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/2/2d/Awk-example-usage-gimp.gif/375px-Awk-example-usage-gimp.gif 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/2/2d/Awk-example-usage-gimp.gif/500px-Awk-example-usage-gimp.gif 2x" data-file-width="1040" data-file-height="608"></a></span></td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Programming_paradigm" title="Programming paradigm">Paradigm</a></th><td class="infobox-data"><a href="/wiki/Scripting_language" title="Scripting language">Scripting</a>, <a href="/wiki/Procedural_programming" title="Procedural programming">procedural</a>, <a href="/wiki/Data-driven_programming" title="Data-driven programming">data-driven</a><sup id="cite_ref-developerworks_1-0" class="reference"><a href="#cite_note-developerworks-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup></td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Software_design" title="Software design">Designed by</a></th><td class="infobox-data"><a href="/wiki/Alfred_Aho" title="Alfred Aho">Alfred Aho</a>, <a href="/wiki/Peter_J._Weinberger" title="Peter J. Weinberger">Peter Weinberger</a>, and <a href="/wiki/Brian_Kernighan" title="Brian Kernighan">Brian Kernighan</a></td></tr><tr><th scope="row" class="infobox-label">First appeared</th><td class="infobox-data">1977<span class="noprint">; 48 years ago</span><span style="display:none"> (<span class="bday dtstart published updated">1977</span>)</span></td></tr><tr><td colspan="2" class="infobox-full-data"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1257001546"></td></tr><tr><th scope="row" class="infobox-label" style="white-space: nowrap;"><a href="/wiki/Software_release_life_cycle" title="Software release life cycle">Stable release</a></th><td class="infobox-data"><div style="margin:0px;"><a rel="nofollow" class="external text" href="http://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html">IEEE Std 1003.1-2008</a> (POSIX) / 1985 </div></td></tr><tr style="display:none"><td colspan="2"> </td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Type_system" title="Type system">Typing discipline</a></th><td class="infobox-data">none; can handle strings, integers and floating-point numbers; regular expressions</td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Operating_system" title="Operating system">OS</a></th><td class="infobox-data"><a href="/wiki/Cross-platform" class="mw-redirect" title="Cross-platform">Cross-platform</a></td></tr><tr><th colspan="2" class="infobox-header" style="background-color: #eee;">Major <a href="/wiki/Programming_language_implementation" title="Programming language implementation">implementations</a></th></tr><tr><td colspan="2" class="infobox-full-data">awk, GNU Awk, mawk, nawk, MKS AWK, Thompson AWK (compiler), Awka (compiler)</td></tr><tr><th colspan="2" class="infobox-header" style="background-color: #eee;"><a href="/wiki/Programming_language#Dialects,_flavors_and_implementations" title="Programming language">Dialects</a></th></tr><tr><td colspan="2" class="infobox-full-data"><i>old awk</i> oawk 1977, <i>new awk</i> nawk 1985, <i>GNU Awk</i> gawk</td></tr><tr><th colspan="2" class="infobox-header" style="background-color: #eee;">Influenced by</th></tr><tr><td colspan="2" class="infobox-full-data"><a href="/wiki/C_(programming_language)" title="C (programming language)">C</a>, <a href="/wiki/Sed" title="Sed">sed</a>, <a href="/wiki/SNOBOL" title="SNOBOL">SNOBOL</a><sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup></td></tr><tr><th colspan="2" class="infobox-header" style="background-color: #eee;">Influenced</th></tr><tr><td colspan="2" class="infobox-full-data"><a href="/wiki/Tcl" title="Tcl">Tcl</a>, <a href="/wiki/AMPL" title="AMPL">AMPL</a>, <a href="/wiki/Perl" title="Perl">Perl</a>, <a href="/wiki/Korn_Shell" class="mw-redirect" title="Korn Shell">Korn Shell</a> (<i>ksh93</i>, <i>dtksh</i>, <i>tksh</i>), <a href="/wiki/Lua_(programming_language)" title="Lua (programming language)">Lua</a></td></tr></tbody></table> <p>The AWK language is a <a href="/wiki/Data-driven_programming" title="Data-driven programming">data-driven</a> <a href="/wiki/Scripting_language" title="Scripting language">scripting language</a> consisting of a set of actions to be taken against <a href="/wiki/Stream_(computing)" title="Stream (computing)">streams</a> of textual data – either run directly on files or used as part of a <a href="/wiki/Pipeline_(Unix)" title="Pipeline (Unix)">pipeline</a> – for purposes of extracting or transforming text, such as producing formatted reports. The language extensively uses the <a href="/wiki/String_(computer_science)" title="String (computer science)">string</a> <a href="/wiki/Datatype" class="mw-redirect" title="Datatype">datatype</a>, <a href="/wiki/Associative_array" title="Associative array">associative arrays</a> (that is, arrays indexed by key strings), and <a href="/wiki/Regular_expression" title="Regular expression">regular expressions</a>. While AWK has a limited intended <a href="/wiki/Domain_(software_engineering)" title="Domain (software engineering)">application domain</a> and was especially designed to support <a href="/wiki/One-liner_program" title="One-liner program">one-liner programs</a>, the language is <a href="/wiki/Turing-complete" class="mw-redirect" title="Turing-complete">Turing-complete</a>, and even the early Bell Labs users of AWK often wrote well-structured large AWK programs.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> </p><p>AWK was created at <a href="/wiki/Bell_Labs" title="Bell Labs">Bell Labs</a> in the 1970s,<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> and its name is derived from the surnames of its authors: <a href="/wiki/Alfred_Aho" title="Alfred Aho">Alfred Aho</a> (author of <a href="/wiki/Egrep" class="mw-redirect" title="Egrep">egrep</a>), <a href="/wiki/Peter_J._Weinberger" title="Peter J. Weinberger">Peter Weinberger</a> (who worked on tiny relational databases), and <a href="/wiki/Brian_Kernighan" title="Brian Kernighan">Brian Kernighan</a>. The acronym is pronounced the same as the name of the bird species <a href="/wiki/Auk" title="Auk">auk</a>, which is illustrated on the cover of <i><a href="/wiki/The_AWK_Programming_Language" title="The AWK Programming Language">The AWK Programming Language</a></i>.<sup id="cite_ref-AWK1_7-0" class="reference"><a href="#cite_note-AWK1-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> When written in all lowercase letters, as <code>awk</code>, it refers to the <a href="/wiki/Unix" title="Unix">Unix</a> or <a href="/wiki/Plan_9_from_Bell_Labs" title="Plan 9 from Bell Labs">Plan 9</a> program that runs scripts written in the AWK programming language. </p> <div id="toc" class="toc" role="navigation" aria-labelledby="mw-toc-heading"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none"><div class="toctitle" lang="en" dir="ltr"><h2 id="mw-toc-heading">Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div> <ul> <li class="toclevel-1 tocsection-1"><a href="#History"><span class="tocnumber">1</span> <span class="toctext">History</span></a></li> <li class="toclevel-1 tocsection-2"><a href="#Structure_of_AWK_programs"><span class="tocnumber">2</span> <span class="toctext">Structure of AWK programs</span></a></li> <li class="toclevel-1 tocsection-3"><a href="#Commands"><span class="tocnumber">3</span> <span class="toctext">Commands</span></a> <ul> <li class="toclevel-2 tocsection-4"><a href="#The_print_command"><span class="tocnumber">3.1</span> <span class="toctext">The <i>print</i> command</span></a></li> <li class="toclevel-2 tocsection-5"><a href="#Built-in_variables"><span class="tocnumber">3.2</span> <span class="toctext">Built-in variables</span></a></li> <li class="toclevel-2 tocsection-6"><a href="#Variables_and_syntax"><span class="tocnumber">3.3</span> <span class="toctext">Variables and syntax</span></a></li> <li class="toclevel-2 tocsection-7"><a href="#User-defined_functions"><span class="tocnumber">3.4</span> <span class="toctext">User-defined functions</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-8"><a href="#Examples"><span class="tocnumber">4</span> <span class="toctext">Examples</span></a> <ul> <li class="toclevel-2 tocsection-9"><a href="#Hello,_World!"><span class="tocnumber">4.1</span> <span class="toctext">Hello, World!</span></a></li> <li class="toclevel-2 tocsection-10"><a href="#Print_lines_longer_than_80_characters"><span class="tocnumber">4.2</span> <span class="toctext">Print lines longer than 80 characters</span></a></li> <li class="toclevel-2 tocsection-11"><a href="#Count_words"><span class="tocnumber">4.3</span> <span class="toctext">Count words</span></a></li> <li class="toclevel-2 tocsection-12"><a href="#Sum_last_word"><span class="tocnumber">4.4</span> <span class="toctext">Sum last word</span></a></li> <li class="toclevel-2 tocsection-13"><a href="#Match_a_range_of_input_lines"><span class="tocnumber">4.5</span> <span class="toctext">Match a range of input lines</span></a> <ul> <li class="toclevel-3 tocsection-14"><a href="#Printing_the_initial_or_the_final_part_of_a_file"><span class="tocnumber">4.5.1</span> <span class="toctext">Printing the initial or the final part of a file</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-15"><a href="#Calculate_word_frequencies"><span class="tocnumber">4.6</span> <span class="toctext">Calculate word frequencies</span></a></li> <li class="toclevel-2 tocsection-16"><a href="#Match_pattern_from_command_line"><span class="tocnumber">4.7</span> <span class="toctext">Match pattern from command line</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-17"><a href="#Self-contained_AWK_scripts"><span class="tocnumber">5</span> <span class="toctext">Self-contained AWK scripts</span></a></li> <li class="toclevel-1 tocsection-18"><a href="#Versions_and_implementations"><span class="tocnumber">6</span> <span class="toctext">Versions and implementations</span></a></li> <li class="toclevel-1 tocsection-19"><a href="#Books"><span class="tocnumber">7</span> <span class="toctext">Books</span></a></li> <li class="toclevel-1 tocsection-20"><a href="#See_also"><span class="tocnumber">8</span> <span class="toctext">See also</span></a></li> <li class="toclevel-1 tocsection-21"><a href="#References"><span class="tocnumber">9</span> <span class="toctext">References</span></a></li> <li class="toclevel-1 tocsection-22"><a href="#Further_reading"><span class="tocnumber">10</span> <span class="toctext">Further reading</span></a></li> <li class="toclevel-1 tocsection-23"><a href="#External_links"><span class="tocnumber">11</span> <span class="toctext">External links</span></a></li> </ul> </div> </section><div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(1)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><h2 id="History">History</h2><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=1" title="Edit section: History" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div><section class="mf-section-1 collapsible-block" id="mf-section-1"> <p>According to Brian Kernighan, one of the goals of AWK was to have a tool that would easily manipulate both numbers and strings. AWK was also inspired by <a href="/wiki/Marc_Rochkind" title="Marc Rochkind">Marc Rochkind</a>'s programming language that was used to search for patterns in input data, and was implemented using <a href="/wiki/Yacc" title="Yacc">yacc</a>.<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> </p><p>As one of the early tools to appear in <a href="/wiki/Version_7_Unix" title="Version 7 Unix">Version 7 Unix</a>, AWK added computational features to a Unix <a href="/wiki/Pipeline_(Unix)" title="Pipeline (Unix)">pipeline</a> besides the <a href="/wiki/Bourne_shell" title="Bourne shell">Bourne shell</a>, the only scripting language available in a standard Unix environment. It is one of the mandatory utilities of the <a href="/wiki/Single_UNIX_Specification" title="Single UNIX Specification">Single UNIX Specification</a>,<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup> and is required by the <a href="/wiki/Linux_Standard_Base" title="Linux Standard Base">Linux Standard Base</a> specification.<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup> </p><p>In 1983, AWK was one of several UNIX tools available for Charles River Data Systems' <a href="/wiki/UNOS_(operating_system)" title="UNOS (operating system)">UNOS</a> operating system under <a href="/wiki/Bell_Laboratories" class="mw-redirect" title="Bell Laboratories">Bell Laboratories</a> license.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> </p><p>AWK was significantly revised and expanded in 1985–88, resulting in the <a href="/wiki/Gawk_(GNU_package)" class="mw-redirect" title="Gawk (GNU package)">GNU AWK</a> implementation written by Paul Rubin, <a href="/w/index.php?title=Jay_Fenlason&action=edit&redlink=1" class="new" title="Jay Fenlason (page does not exist)">Jay Fenlason</a>, and <a href="/wiki/Richard_Stallman" title="Richard Stallman">Richard Stallman</a>, released in 1988.<sup id="cite_ref-robbins_12-0" class="reference"><a href="#cite_note-robbins-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> GNU AWK may be the most widely deployed version<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup> because it is included with GNU-based Linux packages. GNU AWK has been maintained solely by <a href="/w/index.php?title=Arnold_Robbins&action=edit&redlink=1" class="new" title="Arnold Robbins (page does not exist)">Arnold Robbins</a> since 1994.<sup id="cite_ref-robbins_12-1" class="reference"><a href="#cite_note-robbins-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> <a href="/wiki/Brian_Kernighan" title="Brian Kernighan">Brian Kernighan</a>'s <a href="/wiki/Nawk" class="mw-redirect" title="Nawk">nawk</a> (New AWK) source was first released in 1993 unpublicized, and publicly since the late 1990s; many BSD systems use it to avoid the GPL license.<sup id="cite_ref-robbins_12-2" class="reference"><a href="#cite_note-robbins-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> </p><p>AWK was preceded by <a href="/wiki/Sed" title="Sed">sed</a> (1974). Both were designed for text processing. They share the line-oriented, data-driven paradigm, and are particularly suited to writing <a href="/wiki/One-liner_program" title="One-liner program">one-liner programs</a>, due to the implicit <a href="/wiki/Main_loop" class="mw-redirect" title="Main loop">main loop</a> and current line variables. The power and terseness of early AWK programs – notably the powerful regular expression handling and conciseness due to implicit variables, which facilitate one-liners – together with the limitations of AWK at the time, were important inspirations for the <a href="/wiki/Perl" title="Perl">Perl</a> language (1987). In the 1990s, Perl became very popular, competing with AWK in the niche of Unix text-processing languages. </p> </section><div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(2)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><h2 id="Structure_of_AWK_programs">Structure of AWK programs</h2><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=2" title="Edit section: Structure of AWK programs" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div><section class="mf-section-2 collapsible-block" id="mf-section-2"> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:POSIX_awk.pdf" class="mw-file-description"><noscript><img src="//upload.wikimedia.org/wikipedia/commons/thumb/7/78/POSIX_awk.pdf/page1-220px-POSIX_awk.pdf.jpg" decoding="async" width="220" height="156" class="mw-file-element" data-file-width="1752" data-file-height="1239"></noscript><span class="lazy-image-placeholder" style="width: 220px;height: 156px;" data-mw-src="//upload.wikimedia.org/wikipedia/commons/thumb/7/78/POSIX_awk.pdf/page1-220px-POSIX_awk.pdf.jpg" data-width="220" data-height="156" data-mw-srcset="//upload.wikimedia.org/wikipedia/commons/thumb/7/78/POSIX_awk.pdf/page1-330px-POSIX_awk.pdf.jpg 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/7/78/POSIX_awk.pdf/page1-440px-POSIX_awk.pdf.jpg 2x" data-class="mw-file-element"> </span></a><figcaption></figcaption></figure> <style data-mw-deduplicate="TemplateStyles:r1244412712">.mw-parser-output .templatequote{overflow:hidden;margin:1em 0;padding:0 32px}.mw-parser-output .templatequotecite{line-height:1.5em;text-align:left;margin-top:0}@media(min-width:500px){.mw-parser-output .templatequotecite{padding-left:1.6em}}</style><blockquote class="templatequote"><p>AWK reads the input a line at a time. A line is scanned for each pattern in the program, and for each pattern that matches, the associated action is executed.</p><div class="templatequotecite">— <cite>Alfred V. Aho<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup></cite></div></blockquote> <p>An AWK program is a series of pattern action pairs, written as: </p> <div class="mw-highlight mw-highlight-lang-awk mw-content-ltr" dir="ltr"><pre><span></span><span class="nx">condition</span> <span class="p">{</span> <span class="nx">action</span> <span class="p">}</span> <span class="nx">condition</span> <span class="p">{</span> <span class="nx">action</span> <span class="p">}</span> <span class="p">...</span> </pre></div> <p>where <i>condition</i> is typically an expression and <i>action</i> is a series of commands. The input is split into records, where by default records are separated by newline characters so that the input is split into lines. The program tests each record against each of the conditions in turn, and executes the <i>action</i> for each expression that is true. Either the condition or the action may be omitted. The condition defaults to matching every record. The default action is to print the record. This is the same pattern-action structure as sed. </p><p>In addition to a simple AWK expression, such as <code>foo == 1</code> or <code>/^foo/</code>, the condition can be <code>BEGIN</code> or <code>END</code> causing the action to be executed before or after all records have been read, or <i>pattern1, pattern2</i> which matches the range of records starting with a record that matches <i>pattern1</i> up to and including the record that matches <i>pattern2</i> before again trying to match against <i>pattern1</i> on subsequent lines. </p><p>In addition to normal arithmetic and logical operators, AWK expressions include the tilde operator, <code>~</code>, which matches a <a href="/wiki/Regular_expression" title="Regular expression">regular expression</a> against a string. As handy <a href="/wiki/Syntactic_sugar" title="Syntactic sugar">syntactic sugar</a>, <i>/regexp/</i> without using the tilde operator matches against the current record; this syntax derives from <a href="/wiki/Sed" title="Sed">sed</a>, which in turn inherited it from the <a href="/wiki/Ed_(text_editor)" class="mw-redirect" title="Ed (text editor)">ed</a> editor, where <code>/</code> is used for searching. This syntax of using slashes as <a href="/wiki/Delimiter" title="Delimiter">delimiters</a> for regular expressions was subsequently adopted by <a href="/wiki/Perl" title="Perl">Perl</a> and <a href="/wiki/ECMAScript" title="ECMAScript">ECMAScript</a>, and is now common. The tilde operator was also adopted by Perl. </p> </section><div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(3)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><h2 id="Commands">Commands</h2><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=3" title="Edit section: Commands" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div><section class="mf-section-3 collapsible-block" id="mf-section-3"> <p>AWK commands are the statements that are substituted for <i>action</i> in the examples above. AWK commands can include function calls, variable assignments, calculations, or any combination thereof. AWK contains built-in support for many functions; many more are provided by the various flavors of AWK. Also, some flavors support the inclusion of <a href="/wiki/Dynamically_linked_library" class="mw-redirect" title="Dynamically linked library">dynamically linked libraries</a>, which can also provide more functions. </p> <div class="mw-heading mw-heading3"><h3 id="The_print_command">The <i>print</i> command</h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=4" title="Edit section: The print command" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>The <i>print</i> command is used to output text. The output text is always terminated with a predefined string called the output record separator (ORS) whose default value is a newline. The simplest form of this command is: </p> <dl><dt><code>print</code></dt> <dd>This displays the contents of the current record. In AWK, records are broken down into <i>fields</i>, and these can be displayed separately:</dd> <dt><code>print $1</code></dt> <dd>Displays the first field of the current record</dd> <dt><code>print $1, $3</code></dt> <dd>Displays the first and third fields of the current record, separated by a predefined string called the output field separator (OFS) whose default value is a single space character</dd></dl> <p>Although these fields (<i>$X</i>) may bear resemblance to variables (the $ symbol indicates variables in the usual Unix shells and in <a href="/wiki/Perl" title="Perl">Perl</a>), they actually refer to the fields of the current record. A special case, <i>$0</i>, refers to the entire record. In fact, the commands "<code>print</code>" and "<code>print $0</code>" are identical in functionality. </p><p>The <i>print</i> command can also display the results of calculations and/or function calls: </p> <div class="mw-highlight mw-highlight-lang-awk mw-content-ltr" dir="ltr"><pre><span></span><span class="sr">/regex_pattern/</span> <span class="p">{</span> <span class="c1"># Actions to perform in the event the record (line) matches the above regex_pattern</span> <span class="kr">print</span> <span class="mi">3</span><span class="o">+</span><span class="mi">2</span> <span class="kr">print</span> <span class="nx">foobar</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span> <span class="kr">print</span> <span class="nx">foobar</span><span class="p">(</span><span class="nx">variable</span><span class="p">)</span> <span class="kr">print</span> <span class="kr">sin</span><span class="p">(</span><span class="mi">3</span><span class="o">-</span><span class="mi">2</span><span class="p">)</span> <span class="p">}</span> </pre></div> <p>Output may be sent to a file: </p> <div class="mw-highlight mw-highlight-lang-awk mw-content-ltr" dir="ltr"><pre><span></span><span class="sr">/regex_pattern/</span> <span class="p">{</span> <span class="c1"># Actions to perform in the event the record (line) matches the above regex_pattern</span> <span class="kr">print</span> <span class="s2">"expression"</span> <span class="o">></span> <span class="s2">"file name"</span> <span class="p">}</span> </pre></div> <p>or through a <a href="/wiki/Pipe_(Unix)" class="mw-redirect" title="Pipe (Unix)">pipe</a>: </p> <div class="mw-highlight mw-highlight-lang-awk mw-content-ltr" dir="ltr"><pre><span></span><span class="sr">/regex_pattern/</span> <span class="p">{</span> <span class="c1"># Actions to perform in the event the record (line) matches the above regex_pattern</span> <span class="kr">print</span> <span class="s2">"expression"</span> <span class="o">|</span> <span class="s2">"command"</span> <span class="p">}</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Built-in_variables">Built-in variables</h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=5" title="Edit section: Built-in variables" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>AWK's built-in variables include the field variables: $1, $2, $3, and so on ($0 represents the entire record). They hold the text or values in the individual text-fields in a record. </p><p>Other variables include: </p> <ul><li><code>NR</code>: Number of Records. Keeps a current count of the number of input records read so far from all data files. It starts at zero, but is never automatically reset to zero.<sup id="cite_ref-GNU.org_Records_15-0" class="reference"><a href="#cite_note-GNU.org_Records-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup></li> <li><code>FNR</code>: File Number of Records. Keeps a current count of the number of input records read so far <i>in the current file.</i> This variable is automatically reset to zero each time a new file is started.<sup id="cite_ref-GNU.org_Records_15-1" class="reference"><a href="#cite_note-GNU.org_Records-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup></li> <li><code>NF</code>: Number of Fields. Contains the number of fields in the current input record. The last field in the input record can be designated by $NF, the 2nd-to-last field by $(NF-1), the 3rd-to-last field by $(NF-2), etc.</li> <li><code>FILENAME</code>: Contains the name of the current input-file.</li> <li><code>FS</code>: Field Separator. Contains the "field separator" used to divide fields in the input record. The default, "white space", allows any sequence of space and tab characters. FS can be reassigned with another character or character sequence to change the field separator.</li> <li><code>RS</code>: Record Separator. Stores the current "record separator" character. Since, by default, an input line is the input record, the default record separator character is a "newline".</li> <li><code>OFS</code>: Output Field Separator. Stores the "output field separator", which separates the fields when awk prints them. The default is a "space" character.</li> <li><code>ORS</code>: Output Record Separator. Stores the "output record separator", which separates the output records when awk prints them. The default is a "newline" character.</li> <li><code>OFMT</code>: Output Format. Stores the format for numeric output. The default format is "%.6g".</li></ul> <div class="mw-heading mw-heading3"><h3 id="Variables_and_syntax">Variables and syntax</h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=6" title="Edit section: Variables and syntax" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>Variable names can use any of the characters [A-Za-z0-9_], with the exception of language keywords, and cannot begin with a numeric digit. The operators <i>+ - * /</i> represent addition, subtraction, multiplication, and division, respectively. For string <a href="/wiki/Concatenation" title="Concatenation">concatenation</a>, simply place two variables (or string constants) next to each other. It is optional to use a space in between if string constants are involved, but two variable names placed adjacent to each other require a space in between. Double quotes <a href="/wiki/Delimit" class="mw-redirect" title="Delimit">delimit</a> string constants. Statements need not end with semicolons. Finally, comments can be added to programs by using <i>#</i> as the first character on a line, or behind a command or sequence of commands. </p> <div class="mw-heading mw-heading3"><h3 id="User-defined_functions">User-defined functions</h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=7" title="Edit section: User-defined functions" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>In a format similar to <a href="/wiki/C_(programming_language)" title="C (programming language)">C</a>, function definitions consist of the keyword <code>function</code>, the function name, argument names and the function body. Here is an example of a function. </p> <div class="mw-highlight mw-highlight-lang-awk mw-content-ltr" dir="ltr"><pre><span></span><span class="kd">function</span> <span class="nx">add_three</span><span class="p">(</span><span class="nx">number</span><span class="p">)</span> <span class="p">{</span> <span class="k">return</span> <span class="nx">number</span> <span class="o">+</span> <span class="mi">3</span> <span class="p">}</span> </pre></div> <p>This statement can be invoked as follows: </p> <div class="mw-highlight mw-highlight-lang-awk mw-content-ltr" dir="ltr"><pre><span></span><span class="p">(</span><span class="nx">pattern</span><span class="p">)</span> <span class="p">{</span> <span class="kr">print</span> <span class="nx">add_three</span><span class="p">(</span><span class="mi">36</span><span class="p">)</span> <span class="c1"># Outputs '''39'''</span> <span class="p">}</span> </pre></div> <p>Functions can have variables that are in the local scope. The names of these are added to the end of the argument list, though values for these should be omitted when calling the function. It is convention to add some <a href="/wiki/Whitespace_character" title="Whitespace character">whitespace</a> in the argument list before the local variables, to indicate where the parameters end and the local variables begin. </p> </section><div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(4)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><h2 id="Examples">Examples</h2><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=8" title="Edit section: Examples" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div><section class="mf-section-4 collapsible-block" id="mf-section-4"> <div class="mw-heading mw-heading3"><h3 id="Hello,_World!"><span id="Hello.2C_World.21"></span>Hello, World!</h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=9" title="Edit section: Hello, World!" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>Here is the customary <a href="/wiki/%22Hello,_World!%22_program" title='"Hello, World!" program'>"Hello, World!" program</a> written in AWK: </p> <div class="mw-highlight mw-highlight-lang-awk mw-content-ltr" dir="ltr"><pre><span></span><span class="nb">BEGIN</span> <span class="p">{</span> <span class="kr">print</span> <span class="s2">"Hello, world!"</span> <span class="k">exit</span> <span class="p">}</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Print_lines_longer_than_80_characters">Print lines longer than 80 characters</h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=10" title="Edit section: Print lines longer than 80 characters" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>Print all lines longer than 80 characters. The default action is to print the current line. </p> <div class="mw-highlight mw-highlight-lang-awk mw-content-ltr" dir="ltr"><pre><span></span><span class="kr">length</span><span class="p">(</span><span class="o">$</span><span class="mi">0</span><span class="p">)</span> <span class="o">></span> <span class="mi">80</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Count_words">Count words</h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=11" title="Edit section: Count words" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>Count words in the input and print the number of lines, words, and characters (like <a href="/wiki/Wc_(Unix)" title="Wc (Unix)">wc</a>): </p> <div class="mw-highlight mw-highlight-lang-awk mw-content-ltr" dir="ltr"><pre><span></span><span class="p">{</span> <span class="nx">words</span> <span class="o">+=</span> <span class="nb">NF</span> <span class="nx">chars</span> <span class="o">+=</span> <span class="kr">length</span> <span class="o">+</span> <span class="mi">1</span> <span class="c1"># add one to account for the newline character at the end of each record (line)</span> <span class="p">}</span> <span class="nb">END</span> <span class="p">{</span> <span class="kr">print</span> <span class="nb">NR</span><span class="p">,</span> <span class="nx">words</span><span class="p">,</span> <span class="nx">chars</span> <span class="p">}</span> </pre></div> <p>As there is no pattern for the first line of the program, every line of input matches by default, so the increment actions are executed for every line. <code>words += NF</code> is shorthand for <code>words = words + NF</code>. </p> <div class="mw-heading mw-heading3"><h3 id="Sum_last_word">Sum last word</h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=12" title="Edit section: Sum last word" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <div class="mw-highlight mw-highlight-lang-awk mw-content-ltr" dir="ltr"><pre><span></span><span class="p">{</span> <span class="nx">s</span> <span class="o">+=</span> <span class="o">$</span><span class="nb">NF</span> <span class="p">}</span> <span class="nb">END</span> <span class="p">{</span> <span class="kr">print</span> <span class="nx">s</span> <span class="o">+</span> <span class="mi">0</span> <span class="p">}</span> </pre></div> <p><i>s</i> is incremented by the numeric value of <i>$NF</i>, which is the last word on the line as defined by AWK's field separator (by default, white-space). <i>NF</i> is the number of fields in the current line, e.g. 4. Since <i>$4</i> is the value of the fourth field, <i>$NF</i> is the value of the last field in the line regardless of how many fields this line has, or whether it has more or fewer fields than surrounding lines. $ is actually a unary operator with the highest <a href="/wiki/Operator_precedence" class="mw-redirect" title="Operator precedence">operator precedence</a>. (If the line has no fields, then <i>NF</i> is 0, <i>$0</i> is the whole line, which in this case is empty apart from possible white-space, and so has the numeric value 0.) </p><p>At the end of the input the <i>END</i> pattern matches, so <i>s</i> is printed. However, since there may have been no lines of input at all, in which case no value has ever been assigned to <i>s</i>, it will by default be an empty string. Adding zero to a variable is an AWK idiom for coercing it from a string to a numeric value. (Concatenating an empty string is to coerce from a number to a string, e.g. <i>s ""</i>. Note, there's no operator to concatenate strings, they're just placed adjacently.) With the coercion the program prints "0" on an empty input, without it, an empty line is printed. </p> <div class="mw-heading mw-heading3"><h3 id="Match_a_range_of_input_lines">Match a range of input lines</h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=13" title="Edit section: Match a range of input lines" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <div class="mw-highlight mw-highlight-lang-awk mw-content-ltr" dir="ltr"><pre><span></span><span class="nb">NR</span> <span class="o">%</span> <span class="mi">4</span> <span class="o">==</span> <span class="mi">1</span><span class="p">,</span> <span class="nb">NR</span> <span class="o">%</span> <span class="mi">4</span> <span class="o">==</span> <span class="mi">3</span> <span class="p">{</span> <span class="kr">printf</span> <span class="s2">"%6d %s\n"</span><span class="p">,</span> <span class="nb">NR</span><span class="p">,</span> <span class="o">$</span><span class="mi">0</span> <span class="p">}</span> </pre></div> <p>The action statement prints each line numbered. The printf function emulates the standard C <a href="/wiki/Printf" title="Printf">printf</a> and works similarly to the print command described above. The pattern to match, however, works as follows: <i>NR</i> is the number of records, typically lines of input, AWK has so far read, i.e. the current line number, starting at 1 for the first line of input. <i>%</i> is the <a href="/wiki/Modulo_operation" class="mw-redirect" title="Modulo operation">modulo</a> operator. <i>NR % 4 == 1</i> is true for the 1st, 5th, 9th, etc., lines of input. Likewise, <i>NR % 4 == 3</i> is true for the 3rd, 7th, 11th, etc., lines of input. The range pattern is false until the first part matches, on line 1, and then remains true up to and including when the second part matches, on line 3. It then stays false until the first part matches again on line 5. </p><p>Thus, the program prints lines 1,2,3, skips line 4, and then 5,6,7, and so on. For each line, it prints the line number (on a 6 character-wide field) and then the line contents. For example, when executed on this input: </p> <pre>Rome Florence Milan Naples Turin Venice </pre> <p>The previous program prints: </p> <pre> 1 Rome 2 Florence 3 Milan 5 Turin 6 Venice </pre> <div class="mw-heading mw-heading4"><h4 id="Printing_the_initial_or_the_final_part_of_a_file">Printing the initial or the final part of a file</h4><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=14" title="Edit section: Printing the initial or the final part of a file" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>As a special case, when the first part of a range pattern is constantly true, e.g. <i>1</i>, the range will start at the beginning of the input. Similarly, if the second part is constantly false, e.g. <i>0</i>, the range will continue until the end of input. For example, </p> <div class="mw-highlight mw-highlight-lang-awk mw-content-ltr" dir="ltr"><pre><span></span> <span class="sr">/^--cut here--$/</span><span class="p">,</span> <span class="mi">0</span> </pre></div> <p>prints lines of input from the first line matching the regular expression <i>^--cut here--$</i>, that is, a line containing only the phrase "--cut here--", to the end. </p> <div class="mw-heading mw-heading3"><h3 id="Calculate_word_frequencies">Calculate word frequencies</h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=15" title="Edit section: Calculate word frequencies" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p><a href="/wiki/Word_frequency" class="mw-redirect" title="Word frequency">Word frequency</a> using <a href="/wiki/Associative_array" title="Associative array">associative arrays</a>: </p> <div class="mw-highlight mw-highlight-lang-awk mw-content-ltr" dir="ltr"><pre><span></span><span class="nb">BEGIN</span> <span class="p">{</span> <span class="nb">FS</span><span class="o">=</span><span class="s2">"[^a-zA-Z]+"</span> <span class="p">}</span> <span class="p">{</span> <span class="k">for</span> <span class="p">(</span><span class="nx">i</span><span class="o">=</span><span class="mi">1</span><span class="p">;</span> <span class="nx">i</span><span class="o"><=</span><span class="nb">NF</span><span class="p">;</span> <span class="nx">i</span><span class="o">++</span><span class="p">)</span> <span class="nx">words</span><span class="p">[</span><span class="kr">tolower</span><span class="p">(</span><span class="o">$</span><span class="nx">i</span><span class="p">)]</span><span class="o">++</span> <span class="p">}</span> <span class="nb">END</span> <span class="p">{</span> <span class="k">for</span> <span class="p">(</span><span class="nx">i</span> <span class="o">in</span> <span class="nx">words</span><span class="p">)</span> <span class="kr">print</span> <span class="nx">i</span><span class="p">,</span> <span class="nx">words</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span> <span class="p">}</span> </pre></div> <p>The BEGIN block sets the field separator to any sequence of non-alphabetic characters. Separators can be regular expressions. After that, we get to a bare action, which performs the action on every input line. In this case, for every field on the line, we add one to the number of times that word, first converted to lowercase, appears. Finally, in the END block, we print the words with their frequencies. The line </p> <pre>for (i in words) </pre> <p>creates a loop that goes through the array <i>words</i>, setting <i>i</i> to each <i>subscript</i> of the array. This is different from most languages, where such a loop goes through each <i>value</i> in the array. The loop thus prints out each word followed by its frequency count. <code>tolower</code> was an addition to the One True awk (see below) made after the book was published. </p> <div class="mw-heading mw-heading3"><h3 id="Match_pattern_from_command_line">Match pattern from command line</h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=16" title="Edit section: Match pattern from command line" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>This program can be represented in several ways. The first one uses the <a href="/wiki/Bourne_shell" title="Bourne shell">Bourne shell</a> to make a shell script that does everything. It is the shortest of these methods: </p> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span><span class="ch">#!/bin/sh</span> <span class="nv">pattern</span><span class="o">=</span><span class="s2">"</span><span class="nv">$1</span><span class="s2">"</span> <span class="nb">shift</span> awk<span class="w"> </span><span class="s1">'/'</span><span class="s2">"</span><span class="nv">$pattern</span><span class="s2">"</span><span class="s1">'/ { print FILENAME ":" $0 }'</span><span class="w"> </span><span class="s2">"</span><span class="nv">$@</span><span class="s2">"</span> </pre></div> <p>The <code>$pattern</code> in the awk command is not protected by single quotes so that the shell does expand the variable but it needs to be put in double quotes to properly handle patterns containing spaces. A pattern by itself in the usual way checks to see if the whole line (<code>$0</code>) matches. <code>FILENAME</code> contains the current filename. awk has no explicit concatenation operator; two adjacent strings concatenate them. <code>$0</code> expands to the original unchanged input line. </p><p>There are alternate ways of writing this. This shell script accesses the environment directly from within awk: </p> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span><span class="ch">#!/bin/sh</span> <span class="nb">export</span><span class="w"> </span><span class="nv">pattern</span><span class="o">=</span><span class="s2">"</span><span class="nv">$1</span><span class="s2">"</span> <span class="nb">shift</span> awk<span class="w"> </span><span class="s1">'$0 ~ ENVIRON["pattern"] { print FILENAME ":" $0 }'</span><span class="w"> </span><span class="s2">"</span><span class="nv">$@</span><span class="s2">"</span> </pre></div> <p>This is a shell script that uses <code>ENVIRON</code>, an array introduced in a newer version of the One True awk after the book was published. The subscript of <code>ENVIRON</code> is the name of an environment variable; its result is the variable's value. This is like the <a href="/wiki/Getenv" class="mw-redirect" title="Getenv">getenv</a> function in various standard libraries and <a href="/wiki/POSIX" title="POSIX">POSIX</a>. The shell script makes an environment variable <code>pattern</code> containing the first argument, then drops that argument and has awk look for the pattern in each file. </p><p><code>~</code> checks to see if its left operand matches its right operand; <code>!~</code> is its inverse. A regular expression is just a string and can be stored in variables. </p><p>The next way uses command-line variable assignment, in which an argument to awk can be seen as an assignment to a variable: </p> <div class="mw-highlight mw-highlight-lang-bash mw-content-ltr" dir="ltr"><pre><span></span><span class="ch">#!/bin/sh</span> <span class="nv">pattern</span><span class="o">=</span><span class="s2">"</span><span class="nv">$1</span><span class="s2">"</span> <span class="nb">shift</span> awk<span class="w"> </span><span class="s1">'$0 ~ pattern { print FILENAME ":" $0 }'</span><span class="w"> </span><span class="nv">pattern</span><span class="o">=</span><span class="s2">"</span><span class="nv">$pattern</span><span class="s2">"</span><span class="w"> </span><span class="s2">"</span><span class="nv">$@</span><span class="s2">"</span> </pre></div> <p>Or You can use the <i>-v var=value</i> command line option (e.g. <i>awk -v pattern="$pattern" ...</i>). </p><p>Finally, this is written in pure awk, without help from a shell or without the need to know too much about the implementation of the awk script (as the variable assignment on command line one does), but is a bit lengthy: </p> <div class="mw-highlight mw-highlight-lang-awk mw-content-ltr" dir="ltr"><pre><span></span><span class="nb">BEGIN</span> <span class="p">{</span> <span class="nx">pattern</span> <span class="o">=</span> <span class="nb">ARGV</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="k">for</span> <span class="p">(</span><span class="nx">i</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span> <span class="nx">i</span> <span class="o"><</span> <span class="nb">ARGC</span><span class="p">;</span> <span class="nx">i</span><span class="o">++</span><span class="p">)</span> <span class="c1"># remove first argument</span> <span class="nb">ARGV</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span> <span class="o">=</span> <span class="nb">ARGV</span><span class="p">[</span><span class="nx">i</span> <span class="o">+</span> <span class="mi">1</span><span class="p">]</span> <span class="nb">ARGC</span><span class="o">--</span> <span class="k">if</span> <span class="p">(</span><span class="nb">ARGC</span> <span class="o">==</span> <span class="mi">1</span><span class="p">)</span> <span class="p">{</span> <span class="c1"># the pattern was the only thing, so force read from standard input (used by book)</span> <span class="nb">ARGC</span> <span class="o">=</span> <span class="mi">2</span> <span class="nb">ARGV</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="s2">"-"</span> <span class="p">}</span> <span class="p">}</span> <span class="o">$</span><span class="mi">0</span> <span class="o">~</span> <span class="nx">pattern</span> <span class="p">{</span> <span class="kr">print</span> <span class="nb">FILENAME</span> <span class="s2">":"</span> <span class="o">$</span><span class="mi">0</span> <span class="p">}</span> </pre></div> <p>The <code>BEGIN</code> is necessary not only to extract the first argument, but also to prevent it from being interpreted as a filename after the <code>BEGIN</code> block ends. <code>ARGC</code>, the number of arguments, is always guaranteed to be ≥1, as <code>ARGV[0]</code> is the name of the command that executed the script, most often the string <code>"awk"</code>. <code>ARGV[ARGC]</code> is the empty string, <code>""</code>. <code>#</code> initiates a comment that expands to the end of the line. </p><p>Note the <code>if</code> block. awk only checks to see if it should read from standard input before it runs the command. This means that </p> <pre>awk 'prog' </pre> <p>only works because the fact that there are no filenames is only checked before <code>prog</code> is run! If you explicitly set <code>ARGC</code> to 1 so that there are no arguments, awk will simply quit because it feels there are no more input files. Therefore, you need to explicitly say to read from standard input with the special filename <code>-</code>. </p> </section><div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(5)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><h2 id="Self-contained_AWK_scripts">Self-contained AWK scripts</h2><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=17" title="Edit section: Self-contained AWK scripts" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div><section class="mf-section-5 collapsible-block" id="mf-section-5"> <p>On Unix-like operating systems self-contained AWK scripts can be constructed using the <a href="/wiki/Shebang_(Unix)" title="Shebang (Unix)">shebang</a> syntax. </p><p>For example, a script that sends the content of a given file to standard output may be built by creating a file named <code>print.awk</code> with the following content: </p> <div class="mw-highlight mw-highlight-lang-awk mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">#!/usr/bin/awk -f</span> <span class="p">{</span> <span class="kr">print</span> <span class="o">$</span><span class="mi">0</span> <span class="p">}</span> </pre></div> <p>It can be invoked with: <code>./print.awk <filename></code> </p><p>The <code>-f</code> tells awk that the argument that follows is the file to read the AWK program from, which is the same flag that is used in sed. Since they are often used for one-liners, both these programs default to executing a program given as a command-line argument, rather than a separate file. </p> </section><div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(6)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><h2 id="Versions_and_implementations">Versions and implementations</h2><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=18" title="Edit section: Versions and implementations" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div><section class="mf-section-6 collapsible-block" id="mf-section-6"> <p>AWK was originally written in 1977 and distributed with <a href="/wiki/Version_7_Unix" title="Version 7 Unix">Version 7 Unix</a>. </p><p>In 1985 its authors started expanding the language, most significantly by adding user-defined functions. The language is described in the book <i><a href="/wiki/The_AWK_Programming_Language" title="The AWK Programming Language">The AWK Programming Language</a></i>, published 1988, and its implementation was made available in releases of <a href="/wiki/UNIX_System_V" title="UNIX System V">UNIX System V</a>. To avoid confusion with the incompatible older version, this version was sometimes called "new awk" or <i>nawk</i>. This implementation was released under a <a href="/wiki/Free_software_license" class="mw-redirect" title="Free software license">free software license</a> in 1996 and is still maintained by Brian Kernighan (see external links below).<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (February 2020)">citation needed</span></a></i>]</sup> </p><p>Old versions of Unix, such as <a href="/wiki/UNIX/32V" title="UNIX/32V">UNIX/32V</a>, included <code>awkcc</code>, which converted AWK to C. Kernighan wrote a program to turn awk into <span class="nowrap">C++</span>; its state is not known.<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup> </p> <ul><li><b>BWK awk</b>, also known as <b>nawk</b>, refers to the version by <a href="/wiki/Brian_Kernighan" title="Brian Kernighan">Brian Kernighan</a>. It has been dubbed the "One True AWK" because of the use of the term in association with the book that originally described the language and the fact that Kernighan was one of the original authors of AWK.<sup id="cite_ref-AWK1_7-1" class="reference"><a href="#cite_note-AWK1-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> FreeBSD refers to this version as <i>one-true-awk</i>.<sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup> This version also has features not in the book, such as <code>tolower</code> and <code>ENVIRON</code> that are explained above; see the FIXES file in the source archive for details. This version is used by, for example, <a href="/wiki/Android_(operating_system)" title="Android (operating system)">Android</a>, <a href="/wiki/FreeBSD" title="FreeBSD">FreeBSD</a>, <a href="/wiki/NetBSD" title="NetBSD">NetBSD</a>, <a href="/wiki/OpenBSD" title="OpenBSD">OpenBSD</a>, <a href="/wiki/MacOS" title="MacOS">macOS</a>, and <a href="/wiki/Illumos" title="Illumos">illumos</a>. Brian Kernighan and Arnold Robbins are the main contributors to a source repository for <i>nawk</i>: <span class="url"><a rel="nofollow" class="external text" href="https://github.com/onetrueawk/awk">github<wbr></wbr>.com<wbr></wbr>/onetrueawk<wbr></wbr>/awk</a></span>.</li> <li><b>gawk</b> (<a href="/wiki/GNU" title="GNU">GNU</a> awk) is another free-software implementation and the only implementation that makes serious progress implementing <a href="/wiki/Internationalization_and_localization" title="Internationalization and localization">internationalization and localization</a> and TCP/IP networking. It was written before the original implementation became freely available. It includes its own debugger, and its <a href="/wiki/Profiling_(computer_programming)" title="Profiling (computer programming)">profiler</a> enables the user to make measured performance enhancements to a script. It also enables the user to extend functionality with shared libraries. Some <a href="/wiki/Linux_distribution" title="Linux distribution">Linux distributions</a> include <i>gawk</i> as their default AWK implementation.<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (September 2018)">citation needed</span></a></i>]</sup> As of version 5.2 (September 2022) <i>gawk</i> includes a persistent memory feature that can remember script-defined variables and functions from one invocation of a script to the next and pass data between unrelated scripts, as described in the Persistent-Memory <i>gawk</i> User Manual: <span class="url"><a rel="nofollow" class="external text" href="https://www.gnu.org/software/gawk/manual/pm-gawk/">www<wbr></wbr>.gnu<wbr></wbr>.org<wbr></wbr>/software<wbr></wbr>/gawk<wbr></wbr>/manual<wbr></wbr>/pm-gawk<wbr></wbr>/</a></span>. <ul><li><b>gawk-csv</b>. The <a href="/wiki/Comma-separated_values" title="Comma-separated values">CSV</a> extension of <i>gawk</i> provides facilities for inputting and outputting CSV formatted data.<sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup></li></ul></li> <li><b>mawk</b> is a very fast AWK implementation by Mike Brennan based on a <a href="/wiki/Bytecode" title="Bytecode">bytecode</a> interpreter.</li> <li><b>libmawk</b> is a fork of mawk, allowing applications to embed multiple parallel instances of awk interpreters.</li> <li><b>awka</b> (whose front end is written atop the <i>mawk</i> program) is another translator of AWK scripts into C code. When compiled, statically including the author's libawka.a, the resulting executables are considerably sped up and, according to the author's tests, compare very well with other versions of AWK, <a href="/wiki/Perl" title="Perl">Perl</a>, or <a href="/wiki/Tcl" title="Tcl">Tcl</a>. Small scripts will turn into programs of 160–170 kB.</li> <li><b>tawk</b> (Thompson AWK) is an AWK <a href="/wiki/Compiler" title="Compiler">compiler</a> for <a href="/wiki/Solaris_(operating_system)" class="mw-redirect" title="Solaris (operating system)">Solaris</a>, <a href="/wiki/DOS" title="DOS">DOS</a>, <a href="/wiki/OS/2" title="OS/2">OS/2</a>, and <a href="/wiki/Microsoft_Windows" title="Microsoft Windows">Windows</a>, previously sold by Thompson Automation Software (which has ceased its activities).<sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup></li> <li><b>Jawk</b> is a project to implement AWK in <a href="/wiki/Java_(programming_language)" title="Java (programming language)">Java</a>, hosted on SourceForge.<sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup> Extensions to the language are added to provide access to Java features within AWK scripts (i.e., Java threads, sockets, collections, etc.).</li> <li><b>xgawk</b> is a fork of <i>gawk</i><sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup> that extends <i>gawk</i> with dynamically loadable libraries. The XMLgawk extension was integrated into the official GNU Awk release 4.1.0.</li> <li><b>QSEAWK</b> is an embedded AWK interpreter implementation included in the QSE library that provides embedding <a href="/wiki/Application_programming_interface" class="mw-redirect" title="Application programming interface">application programming interface</a> (API) for <a href="/wiki/C_(programming_language)" title="C (programming language)">C</a> and <a href="/wiki/C%2B%2B" title="C++">C++</a>.<sup id="cite_ref-22" class="reference"><a href="#cite_note-22"><span class="cite-bracket">[</span>22<span class="cite-bracket">]</span></a></sup></li> <li><b>libfawk</b> is a very small, function-only, reentrant, embeddable interpreter written in C</li> <li><b><a href="/wiki/BusyBox" title="BusyBox">BusyBox</a></b> includes an AWK implementation written by Dmitry Zakharov. This is a very small implementation suitable for embedded systems.</li> <li><b>CLAWK</b> by Michael Parker provides an AWK implementation in <a href="/wiki/Common_Lisp" title="Common Lisp">Common Lisp</a>, based upon the regular expression library of the same author.<sup id="cite_ref-23" class="reference"><a href="#cite_note-23"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup></li> <li><b>goawk</b> is an AWK implementation in Go with a few convenience extensions by Ben Hoyt, hosted on <a rel="nofollow" class="external text" href="https://github.com/benhoyt/goawk">Github</a>.</li></ul> <p>The gawk manual has a list of more AWK implementations.<sup id="cite_ref-24" class="reference"><a href="#cite_note-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup> </p> </section><div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(7)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><h2 id="Books">Books</h2><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=19" title="Edit section: Books" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div><section class="mf-section-7 collapsible-block" id="mf-section-7"> <ul><li><style data-mw-deduplicate="TemplateStyles:r1238218222">.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}</style><cite id="CITEREFAhoKernighanWeinberger1988" class="citation book cs1"><a href="/wiki/Alfred_Aho" title="Alfred Aho">Aho, Alfred V.</a>; <a href="/wiki/Brian_Kernighan" title="Brian Kernighan">Kernighan, Brian W.</a>; <a href="/wiki/Peter_J._Weinberger" title="Peter J. Weinberger">Weinberger, Peter J.</a> (1988-01-01). <span class="id-lock-registration" title="Free registration required"><a rel="nofollow" class="external text" href="https://archive.org/details/awkprogrammingla00ahoa"><i>The AWK Programming Language</i></a></span>. New York, NY: <a href="/wiki/Addison-Wesley" title="Addison-Wesley">Addison-Wesley</a>. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/0-201-07981-X" title="Special:BookSources/0-201-07981-X"><bdi>0-201-07981-X</bdi></a><span class="reference-accessdate">. Retrieved <span class="nowrap">2017-01-22</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=The+AWK+Programming+Language&rft.place=New+York%2C+NY&rft.pub=Addison-Wesley&rft.date=1988-01-01&rft.isbn=0-201-07981-X&rft.aulast=Aho&rft.aufirst=Alfred+V.&rft.au=Kernighan%2C+Brian+W.&rft.au=Weinberger%2C+Peter+J.&rft_id=https%3A%2F%2Farchive.org%2Fdetails%2Fawkprogrammingla00ahoa&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFAhoKernighanWeinberger2023" class="citation book cs1"><a href="/wiki/Alfred_Aho" title="Alfred Aho">Aho, Alfred V.</a>; <a href="/wiki/Brian_Kernighan" title="Brian Kernighan">Kernighan, Brian W.</a>; <a href="/wiki/Peter_J._Weinberger" title="Peter J. Weinberger">Weinberger, Peter J.</a> (2023-09-06). <a rel="nofollow" class="external text" href="https://awk.dev"><i>The AWK Programming Language, Second Edition</i></a>. Hoboken, New Jersey: <a href="/wiki/Addison-Wesley" title="Addison-Wesley">Addison-Wesley Professional</a>. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-0-13-826972-2" title="Special:BookSources/978-0-13-826972-2"><bdi>978-0-13-826972-2</bdi></a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20231027062708/https://awk.dev/">Archived</a> from the original on 2023-10-27<span class="reference-accessdate">. Retrieved <span class="nowrap">2023-11-03</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=The+AWK+Programming+Language%2C+Second+Edition&rft.place=Hoboken%2C+New+Jersey&rft.pub=Addison-Wesley+Professional&rft.date=2023-09-06&rft.isbn=978-0-13-826972-2&rft.aulast=Aho&rft.aufirst=Alfred+V.&rft.au=Kernighan%2C+Brian+W.&rft.au=Weinberger%2C+Peter+J.&rft_id=https%3A%2F%2Fawk.dev&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFRobbins2001" class="citation book cs1">Robbins, Arnold (2001-05-15). <a rel="nofollow" class="external text" href="http://www.oreilly.com/catalog/awkprog3/"><i>Effective awk Programming</i></a> (3rd ed.). Sebastopol, CA: <a href="/wiki/O%27Reilly_Media" title="O'Reilly Media">O'Reilly Media</a>. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/0-596-00070-7" title="Special:BookSources/0-596-00070-7"><bdi>0-596-00070-7</bdi></a><span class="reference-accessdate">. Retrieved <span class="nowrap">2009-04-16</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Effective+awk+Programming&rft.place=Sebastopol%2C+CA&rft.edition=3rd&rft.pub=O%27Reilly+Media&rft.date=2001-05-15&rft.isbn=0-596-00070-7&rft.aulast=Robbins&rft.aufirst=Arnold&rft_id=http%3A%2F%2Fwww.oreilly.com%2Fcatalog%2Fawkprog3%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFDoughertyRobbins1997" class="citation book cs1"><a href="/wiki/Dale_Dougherty" title="Dale Dougherty">Dougherty, Dale</a>; Robbins, Arnold (1997-03-01). <a rel="nofollow" class="external text" href="http://www.oreilly.com/catalog/sed2/"><i>sed & awk</i></a> (2nd ed.). Sebastopol, CA: O'Reilly Media. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/1-56592-225-5" title="Special:BookSources/1-56592-225-5"><bdi>1-56592-225-5</bdi></a><span class="reference-accessdate">. Retrieved <span class="nowrap">2009-04-16</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=sed+%26+awk&rft.place=Sebastopol%2C+CA&rft.edition=2nd&rft.pub=O%27Reilly+Media&rft.date=1997-03-01&rft.isbn=1-56592-225-5&rft.aulast=Dougherty&rft.aufirst=Dale&rft.au=Robbins%2C+Arnold&rft_id=http%3A%2F%2Fwww.oreilly.com%2Fcatalog%2Fsed2%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFRobbins2000" class="citation book cs1">Robbins, Arnold (2000). <a rel="nofollow" class="external text" href="https://www.gnu.org/software/gawk/manual/"><i>Effective Awk Programming: A User's Guide for Gnu Awk</i></a> (1.0.3 ed.). Bloomington, IN: <a href="/wiki/IUniverse" title="IUniverse">iUniverse</a>. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/0-595-10034-1" title="Special:BookSources/0-595-10034-1"><bdi>0-595-10034-1</bdi></a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20090412190359/https://www.gnu.org/software/gawk/manual/">Archived</a> from the original on 12 April 2009<span class="reference-accessdate">. Retrieved <span class="nowrap">2009-04-16</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Effective+Awk+Programming%3A+A+User%27s+Guide+for+Gnu+Awk&rft.place=Bloomington%2C+IN&rft.edition=1.0.3&rft.pub=iUniverse&rft.date=2000&rft.isbn=0-595-10034-1&rft.aulast=Robbins&rft.aufirst=Arnold&rft_id=https%3A%2F%2Fwww.gnu.org%2Fsoftware%2Fgawk%2Fmanual%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></li></ul> </section><div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(8)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><h2 id="See_also">See also</h2><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=20" title="Edit section: See also" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div><section class="mf-section-8 collapsible-block" id="mf-section-8"> <ul><li><a href="/wiki/Data_transformation" class="mw-redirect" title="Data transformation">Data transformation</a></li> <li><a href="/wiki/Event-driven_programming" title="Event-driven programming">Event-driven programming</a></li> <li><a href="/wiki/List_of_Unix_commands" class="mw-redirect" title="List of Unix commands">List of Unix commands</a></li> <li><a href="/wiki/Sed" title="Sed">sed</a></li></ul> </section><div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(9)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><h2 id="References">References</h2><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=21" title="Edit section: References" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div><section class="mf-section-9 collapsible-block" id="mf-section-9"> <style data-mw-deduplicate="TemplateStyles:r1239543626">.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist reflist-columns references-column-width" style="column-width: 30em;"> <ol class="references"> <li id="cite_note-developerworks-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-developerworks_1-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFStutz2006" class="citation web cs1">Stutz, Michael (September 19, 2006). <a rel="nofollow" class="external text" href="https://www6.software.ibm.com/developerworks/education/au-gawk/au-gawk-a4.pdf">"Get started with GAWK: AWK language fundamentals"</a> <span class="cs1-format">(PDF)</span>. <i>developerWorks</i>. <a href="/wiki/IBM" title="IBM">IBM</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20150427143548/https://www6.software.ibm.com/developerworks/education/au-gawk/au-gawk-a4.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2015-04-27<span class="reference-accessdate">. Retrieved <span class="nowrap">2015-01-29</span></span>. <q>[AWK is] often called a data-driven language -- the program statements describe the input data to match and process rather than a sequence of program steps</q></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=developerWorks&rft.atitle=Get+started+with+GAWK%3A+AWK+language+fundamentals&rft.date=2006-09-19&rft.aulast=Stutz&rft.aufirst=Michael&rft_id=https%3A%2F%2Fwww6.software.ibm.com%2Fdeveloperworks%2Feducation%2Fau-gawk%2Fau-gawk-a4.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFAndreas_J._Pilavakis1989" class="citation book cs1">Andreas J. Pilavakis (1989). <i>UNIX Workshop</i>. Macmillan International Higher Education. p. 196.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=UNIX+Workshop&rft.pages=196&rft.pub=Macmillan+International+Higher+Education&rft.date=1989&rft.au=Andreas+J.+Pilavakis&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFArnold_Robbins2015" class="citation book cs1">Arnold Robbins (2015). <i>Effective Awk Programming: Universal Text Processing and Pattern Matching</i> (4th ed.). O'Reilly Media. p. 560.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Effective+Awk+Programming%3A+Universal+Text+Processing+and+Pattern+Matching&rft.pages=560&rft.edition=4th&rft.pub=O%27Reilly+Media&rft.date=2015&rft.au=Arnold+Robbins&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-awkLC.DR-4"><span class="mw-cite-backlink">^ <a href="#cite_ref-awkLC.DR_4-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-awkLC.DR_4-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFJames_W._Livingston1988" class="citation magazine cs1">James W. Livingston (May 2, 1988). "The Great awk Program is No Birdbrain". <i>Digital Review</i>. p. 91.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Digital+Review&rft.atitle=The+Great+awk+Program+is+No+Birdbrain&rft.pages=91&rft.date=1988-05-02&rft.au=James+W.+Livingston&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFRaymond" class="citation web cs1"><a href="/wiki/Eric_S._Raymond" title="Eric S. Raymond">Raymond, Eric S.</a> <a rel="nofollow" class="external text" href="https://web.archive.org/web/20080730063308/http://www.faqs.org/docs/artu/ch08s02.html#awk">"Applying Minilanguages"</a>. <i>The Art of Unix Programming</i>. Case Study: awk. Archived from <a rel="nofollow" class="external text" href="http://www.faqs.org/docs/artu/ch08s02.html#awk">the original</a> on July 30, 2008<span class="reference-accessdate">. Retrieved <span class="nowrap">May 11,</span> 2010</span>. <q>The awk action language is Turing-complete, and can read and write files.</q></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=The+Art+of+Unix+Programming&rft.atitle=Applying+Minilanguages&rft.pages=Case+Study%3A+awk&rft.aulast=Raymond&rft.aufirst=Eric+S.&rft_id=http%3A%2F%2Fwww.faqs.org%2Fdocs%2Fartu%2Fch08s02.html%23awk&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFAhoKernighanWeinberger1978" class="citation techreport cs1"><a href="/wiki/Alfred_Aho" title="Alfred Aho">Aho, Alfred V.</a>; <a href="/wiki/Brian_Kernighan" title="Brian Kernighan">Kernighan, Brian W.</a>; <a href="/wiki/Peter_J._Weinberger" title="Peter J. Weinberger">Weinberger, Peter J.</a> (September 1, 1978). <a rel="nofollow" class="external text" href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.31.1299"><i>Awk — A Pattern Scanning and Processing Language (Second Edition)</i></a> (Technical report). Unix Seventh Edition Manual, Volume 2. Bell Telephone Laboratories, Inc<span class="reference-accessdate">. Retrieved <span class="nowrap">February 1,</span> 2020</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=report&rft.btitle=Awk+%E2%80%94+A+Pattern+Scanning+and+Processing+Language+%28Second+Edition%29&rft.series=Unix+Seventh+Edition+Manual%2C+Volume+2&rft.pub=Bell+Telephone+Laboratories%2C+Inc.&rft.date=1978-09-01&rft.aulast=Aho&rft.aufirst=Alfred+V.&rft.au=Kernighan%2C+Brian+W.&rft.au=Weinberger%2C+Peter+J.&rft_id=https%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fsummary%3Fdoi%3D10.1.1.31.1299&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-AWK1-7"><span class="mw-cite-backlink">^ <a href="#cite_ref-AWK1_7-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-AWK1_7-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFAhoKernighanWeinberger1988" class="citation book cs1">Aho, Alfred V.; Kernighan, Brian W.; Weinberger, Peter J. (1988). <a rel="nofollow" class="external text" href="https://archive.org/details/pdfy-MgN0H1joIoDVoIC7"><i>The AWK Programming Language</i></a>. Addison-Wesley Publishing Company. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/9780201079814" title="Special:BookSources/9780201079814"><bdi>9780201079814</bdi></a><span class="reference-accessdate">. Retrieved <span class="nowrap">16 May</span> 2015</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=The+AWK+Programming+Language&rft.pub=Addison-Wesley+Publishing+Company&rft.date=1988&rft.isbn=9780201079814&rft.aulast=Aho&rft.aufirst=Alfred+V.&rft.au=Kernighan%2C+Brian+W.&rft.au=Weinberger%2C+Peter+J.&rft_id=https%3A%2F%2Farchive.org%2Fdetails%2Fpdfy-MgN0H1joIoDVoIC7&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.youtube.com/watch?v=vT_J6xc-Az0">"UNIX Special: Profs Kernighan & Brailsford"</a>. <i>Computerphile</i>. September 30, 2015. <a rel="nofollow" class="external text" href="https://ghostarchive.org/varchive/youtube/20211122/vT_J6xc-Az0">Archived</a> from the original on 2021-11-22.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Computerphile&rft.atitle=UNIX+Special%3A+Profs+Kernighan+%26+Brailsford&rft.date=2015-09-30&rft_id=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DvT_J6xc-Az0&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20180105030249/http://www.unix.org/version3/apis/cu.html">"The Single UNIX Specification, Version 3, Utilities Interface Table"</a>. Archived from <a rel="nofollow" class="external text" href="http://www.unix.org/version3/apis/cu.html">the original</a> on 2018-01-05<span class="reference-accessdate">. Retrieved <span class="nowrap">2005-12-18</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=The+Single+UNIX+Specification%2C+Version+3%2C+Utilities+Interface+Table&rft_id=http%3A%2F%2Fwww.unix.org%2Fversion3%2Fapis%2Fcu.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation techreport cs1">"Chapter 15. Commands and Utilities". <a rel="nofollow" class="external text" href="https://refspecs.linuxfoundation.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic.html#COMMAND"><i>Linux Standard Base Core Specification 4.0</i></a> (Technical report). Linux Foundation. 2008. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20191016015828/https://refspecs.linuxfoundation.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic.html#COMMAND">Archived</a> from the original on 2019-10-16<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-02-01</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=report&rft.btitle=Linux+Standard+Base+Core+Specification+4.0&rft.pub=Linux+Foundation&rft.date=2008&rft_id=https%3A%2F%2Frefspecs.linuxfoundation.org%2FLSB_4.0.0%2FLSB-Core-generic%2FLSB-Core-generic.html%23COMMAND&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation book cs1"><a rel="nofollow" class="external text" href="https://www.1000bit.it/ad/bro/charles/CharlesRiverSystem-Universe.pdf"><i>The Insider's Guide To The Universe</i></a> <span class="cs1-format">(PDF)</span>. Charles River Data Systems, Inc. 1983. p. 13.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=The+Insider%27s+Guide+To+The+Universe&rft.pages=13&rft.pub=Charles+River+Data+Systems%2C+Inc.&rft.date=1983&rft_id=https%3A%2F%2Fwww.1000bit.it%2Fad%2Fbro%2Fcharles%2FCharlesRiverSystem-Universe.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-robbins-12"><span class="mw-cite-backlink">^ <a href="#cite_ref-robbins_12-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-robbins_12-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-robbins_12-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFRobbins2014" class="citation web cs1">Robbins, Arnold (March 2014). <a rel="nofollow" class="external text" href="http://www.skeeve.com/gnu-awk-and-me-2014.pdf">"The GNU Project and Me: 27 Years with GNU AWK"</a> <span class="cs1-format">(PDF)</span>. <i>skeeve.com</i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20141006081656/http://www.skeeve.com/gnu-awk-and-me-2014.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on October 6, 2014<span class="reference-accessdate">. Retrieved <span class="nowrap">October 4,</span> 2014</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=skeeve.com&rft.atitle=The+GNU+Project+and+Me%3A+27+Years+with+GNU+AWK&rft.date=2014-03&rft.aulast=Robbins&rft.aufirst=Arnold&rft_id=http%3A%2F%2Fwww.skeeve.com%2Fgnu-awk-and-me-2014.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFDoughertyRobbins1997" class="citation book cs1">Dougherty, Dale; Robbins, Arnold (1997). <i>sed & awk</i> (2nd ed.). Sebastopol, CA: O'Reilly. p. 221. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/1-565-92225-5" title="Special:BookSources/1-565-92225-5"><bdi>1-565-92225-5</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=sed+%26+awk&rft.place=Sebastopol%2C+CA&rft.pages=221&rft.edition=2nd&rft.pub=O%27Reilly&rft.date=1997&rft.isbn=1-565-92225-5&rft.aulast=Dougherty&rft.aufirst=Dale&rft.au=Robbins%2C+Arnold&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFHamilton2008" class="citation web cs1">Hamilton, Naomi (May 30, 2008). <a rel="nofollow" class="external text" href="https://www.computerworld.com/article/2535126/the-a-z-of-programming-languages--awk.html">"The A-Z of Programming Languages: AWK"</a>. <i><a href="/wiki/Computerworld" title="Computerworld">Computerworld</a></i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200201095859/https://www.computerworld.com/article/2535126/the-a-z-of-programming-languages--awk.html">Archived</a> from the original on 2020-02-01<span class="reference-accessdate">. Retrieved <span class="nowrap">2008-12-12</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Computerworld&rft.atitle=The+A-Z+of+Programming+Languages%3A+AWK&rft.date=2008-05-30&rft.aulast=Hamilton&rft.aufirst=Naomi&rft_id=https%3A%2F%2Fwww.computerworld.com%2Farticle%2F2535126%2Fthe-a-z-of-programming-languages--awk.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-GNU.org_Records-15"><span class="mw-cite-backlink">^ <a href="#cite_ref-GNU.org_Records_15-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-GNU.org_Records_15-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation book cs1"><a rel="nofollow" class="external text" href="https://www.gnu.org/software/gawk/manual/html_node/Records.html#index-FNR-variable">"Records"</a>. <a rel="nofollow" class="external text" href="https://www.gnu.org/software/gawk/manual/"><i>GAWK: Effective AWK Programming: A User’s Guide for GNU Awk</i></a> (5.3 ed.). September 2024<span class="reference-accessdate">. Retrieved <span class="nowrap">2025-01-24</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.atitle=Records&rft.btitle=GAWK%3A+Effective+AWK+Programming%3A+A+User%E2%80%99s+Guide+for+GNU+Awk&rft.edition=5.3&rft.date=2024-09&rft_id=https%3A%2F%2Fwww.gnu.org%2Fsoftware%2Fgawk%2Fmanual%2Fhtml_node%2FRecords.html%23index-FNR-variable&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFKernighan1991" class="citation conference cs1">Kernighan, Brian W. (April 24–25, 1991). <a rel="nofollow" class="external text" href="https://www.cs.princeton.edu/~bwk/btl.mirror/awkc++.pdf"><i>An AWK to C++ Translator</i></a> <span class="cs1-format">(PDF)</span>. Usenix C++ Conference. Washington, DC. pp. <span class="nowrap">217–</span>228. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200622061725/https://www.cs.princeton.edu/~bwk/btl.mirror/awkc++.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2020-06-22<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-02-01</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=conference&rft.btitle=An+AWK+to+C%2B%2B+Translator&rft.place=Washington%2C+DC&rft.pages=%3Cspan+class%3D%22nowrap%22%3E217-%3C%2Fspan%3E228&rft.date=1991-04-24%2F1991-04-25&rft.aulast=Kernighan&rft.aufirst=Brian+W.&rft_id=https%3A%2F%2Fwww.cs.princeton.edu%2F~bwk%2Fbtl.mirror%2Fawkc%2B%2B.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.freebsd.org/cgi/cvsweb.cgi/src/contrib/one-true-awk/FREEBSD-upgrade?rev=1.9&content-type=text/x-cvsweb-markup">"FreeBSD's work log for importing BWK awk into FreeBSD's core"</a>. May 16, 2005. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20130908180035/http://www.freebsd.org/cgi/cvsweb.cgi/src/contrib/one-true-awk/FREEBSD-upgrade?rev=1.9&content-type=text%2Fx-cvsweb-markup">Archived</a> from the original on September 8, 2013<span class="reference-accessdate">. Retrieved <span class="nowrap">September 20,</span> 2006</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=FreeBSD%27s+work+log+for+importing+BWK+awk+into+FreeBSD%27s+core&rft.date=2005-05-16&rft_id=http%3A%2F%2Fwww.freebsd.org%2Fcgi%2Fcvsweb.cgi%2Fsrc%2Fcontrib%2Fone-true-awk%2FFREEBSD-upgrade%3Frev%3D1.9%26content-type%3Dtext%2Fx-cvsweb-markup&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20200325201153/http://gawkextlib.sourceforge.net/csv/gawk-csv.html">"CSV Processing With gawk (using the gawk-csv extension)"</a>. <i>gawkextlib</i>. 2018. Archived from <a rel="nofollow" class="external text" href="https://gawkextlib.sourceforge.net/csv/gawk-csv.htmlurl-statuse=live">the original</a> on 2020-03-25.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=gawkextlib&rft.atitle=CSV+Processing+With+gawk+%28using+the+gawk-csv+extension%29&rft.date=2018&rft_id=https%3A%2F%2Fgawkextlib.sourceforge.net%2Fcsv%2Fgawk-csv.htmlurl-statuse%3Dlive&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-19">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFJames_K._Lawless1997" class="citation news cs1">James K. Lawless (May 1, 1997). <a rel="nofollow" class="external text" href="https://www.drdobbs.com/tools/examining-the-tawk-compiler/184410193">"Examining the TAWK Compiler"</a>. <i><a href="/wiki/Dr._Dobb%27s_Journal" title="Dr. Dobb's Journal">Dr. Dobb's Journal</a></i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20200221191605/https://www.drdobbs.com/tools/examining-the-tawk-compiler/184410193">Archived</a> from the original on February 21, 2020<span class="reference-accessdate">. Retrieved <span class="nowrap">February 21,</span> 2020</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Dr.+Dobb%27s+Journal&rft.atitle=Examining+the+TAWK+Compiler&rft.date=1997-05-01&rft.au=James+K.+Lawless&rft_id=https%3A%2F%2Fwww.drdobbs.com%2Ftools%2Fexamining-the-tawk-compiler%2F184410193&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-20">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://sourceforge.net/projects/jawk/">"<i>Jawk</i> at SourceForge"</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20070527021808/http://sourceforge.net/projects/jawk">Archived</a> from the original on 2007-05-27<span class="reference-accessdate">. Retrieved <span class="nowrap">2006-08-23</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Jawk+at+SourceForge&rft_id=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fjawk%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-21">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://gawkextlib.sourceforge.net/">"<i>xgawk</i> Home Page"</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20130418224130/http://gawkextlib.sourceforge.net/">Archived</a> from the original on 2013-04-18<span class="reference-accessdate">. Retrieved <span class="nowrap">2013-05-07</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=xgawk+Home+Page&rft_id=http%3A%2F%2Fgawkextlib.sourceforge.net%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-22">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://github.com/hyung-hwan/qse">"QSEAWK at GitHub"</a>. <i><a href="/wiki/GitHub" title="GitHub">GitHub</a></i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20180611001042/https://github.com/hyung-hwan/qse">Archived</a> from the original on 2018-06-11<span class="reference-accessdate">. Retrieved <span class="nowrap">2017-09-06</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=GitHub&rft.atitle=QSEAWK+at+GitHub&rft_id=https%3A%2F%2Fgithub.com%2Fhyung-hwan%2Fqse&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-23">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://github.com/sharplispers/clawk">"CLAWK at GitHub"</a>. <i><a href="/wiki/GitHub" title="GitHub">GitHub</a></i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20210825102602/https://github.com/sharplispers/clawk">Archived</a> from the original on 2021-08-25<span class="reference-accessdate">. Retrieved <span class="nowrap">2021-06-01</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=GitHub&rft.atitle=CLAWK+at+GitHub&rft_id=https%3A%2F%2Fgithub.com%2Fsharplispers%2Fclawk&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> <li id="cite_note-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-24">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation book cs1"><a rel="nofollow" class="external text" href="https://www.gnu.org/software/gawk/manual/html_node/Other-Versions.html">"B.5 Other Freely Available awk Implementations"</a>. <i>GAWK: Effective AWK Programming: A User's Guide for GNU Awk</i> (5.3 ed.). September 2024<span class="reference-accessdate">. Retrieved <span class="nowrap">2025-01-24</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.atitle=B.5+Other+Freely+Available+awk+Implementations&rft.btitle=GAWK%3A+Effective+AWK+Programming%3A+A+User%27s+Guide+for+GNU+Awk&rft.edition=5.3&rft.date=2024-09&rft_id=https%3A%2F%2Fwww.gnu.org%2Fsoftware%2Fgawk%2Fmanual%2Fhtml_node%2FOther-Versions.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></span> </li> </ol></div> </section><div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(10)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><h2 id="Further_reading">Further reading</h2><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=22" title="Edit section: Further reading" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div><section class="mf-section-10 collapsible-block" id="mf-section-10"> <ul><li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFAndy_Oram2021" class="citation web cs1">Andy Oram (May 19, 2021). <a rel="nofollow" class="external text" href="https://www.fosslife.org/awk-power-and-promise-40-year-old-language">"Awk: The Power and Promise of a 40-Year-Old Language"</a>. <i>Fosslife</i><span class="reference-accessdate">. Retrieved <span class="nowrap">June 9,</span> 2021</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Fosslife&rft.atitle=Awk%3A+The+Power+and+Promise+of+a+40-Year-Old+Language&rft.date=2021-05-19&rft.au=Andy+Oram&rft_id=https%3A%2F%2Fwww.fosslife.org%2Fawk-power-and-promise-40-year-old-language&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFHamilton2008" class="citation web cs1">Hamilton, Naomi (May 30, 2008). <a rel="nofollow" class="external text" href="https://www.computerworld.com/article/2535126/the-a-z-of-programming-languages--awk.html">"The A-Z of Programming Languages: AWK"</a>. <i><a href="/wiki/Computerworld" title="Computerworld">Computerworld</a></i><span class="reference-accessdate">. Retrieved <span class="nowrap">2008-12-12</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Computerworld&rft.atitle=The+A-Z+of+Programming+Languages%3A+AWK&rft.date=2008-05-30&rft.aulast=Hamilton&rft.aufirst=Naomi&rft_id=https%3A%2F%2Fwww.computerworld.com%2Farticle%2F2535126%2Fthe-a-z-of-programming-languages--awk.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span> – Interview with Alfred V. Aho on AWK</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFRobbins2000" class="citation web cs1"><a href="/wiki/Daniel_Robbins_(computer_programmer)" title="Daniel Robbins (computer programmer)">Robbins, Daniel</a> (2000-12-01). <a rel="nofollow" class="external text" href="http://www.ibm.com/developerworks/library/l-awk1/">"Awk by example, Part 1: An intro to the great language with the strange name"</a>. <i>Common threads</i>. IBM DeveloperWorks<span class="reference-accessdate">. Retrieved <span class="nowrap">2009-04-16</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Common+threads&rft.atitle=Awk+by+example%2C+Part+1%3A+An+intro+to+the+great+language+with+the+strange+name&rft.date=2000-12-01&rft.aulast=Robbins&rft.aufirst=Daniel&rft_id=http%3A%2F%2Fwww.ibm.com%2Fdeveloperworks%2Flibrary%2Fl-awk1%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFRobbins2001" class="citation web cs1">Robbins, Daniel (2001-01-01). <a rel="nofollow" class="external text" href="http://www.ibm.com/developerworks/library/l-awk2/">"Awk by example, Part 2: Records, loops, and arrays"</a>. <i>Common threads</i>. IBM DeveloperWorks<span class="reference-accessdate">. Retrieved <span class="nowrap">2009-04-16</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Common+threads&rft.atitle=Awk+by+example%2C+Part+2%3A+Records%2C+loops%2C+and+arrays&rft.date=2001-01-01&rft.aulast=Robbins&rft.aufirst=Daniel&rft_id=http%3A%2F%2Fwww.ibm.com%2Fdeveloperworks%2Flibrary%2Fl-awk2%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFRobbins2001" class="citation web cs1">Robbins, Daniel (2001-04-01). <a rel="nofollow" class="external text" href="http://www.ibm.com/developerworks/library/l-awk3/">"Awk by example, Part 3: String functions and ... checkbooks?"</a>. <i>Common threads</i>. IBM DeveloperWorks. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20090519074032/http://www.ibm.com/developerworks/linux/library/l-awk3.html">Archived</a> from the original on 19 May 2009<span class="reference-accessdate">. Retrieved <span class="nowrap">2009-04-16</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Common+threads&rft.atitle=Awk+by+example%2C+Part+3%3A+String+functions+and+...+checkbooks%3F&rft.date=2001-04-01&rft.aulast=Robbins&rft.aufirst=Daniel&rft_id=http%3A%2F%2Fwww.ibm.com%2Fdeveloperworks%2Flibrary%2Fl-awk3%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></li> <li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20081031084509/http://www.think-lamp.com/2008/10/awk-a-boon-for-cli-enthusiasts/">AWK – Become an expert in 60 minutes</a></li> <li><span class="plainlinksneverexpand"><code><a rel="nofollow" class="external text" href="https://pubs.opengroup.org/onlinepubs/9799919799/utilities/awk.html">awk</a></code></span>: pattern scanning and processing language – Shell and Utilities Reference, <a href="/wiki/Single_Unix_Specification" class="mw-redirect" title="Single Unix Specification">The Single UNIX Specification</a>, Version 4 from <a href="/wiki/The_Open_Group" title="The Open Group">The Open Group</a></li> <li><span class="plainlinksneverexpand"><code><a rel="nofollow" class="external text" href="https://manned.org/gawk.1">gawk(1)</a></code></span> – <a href="/wiki/Linux" title="Linux">Linux</a> User <a href="/wiki/Man_page" title="Man page">Manual</a> – User Commands</li></ul> </section><div class="mw-heading mw-heading2 section-heading" onclick="mfTempOpenSection(11)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><h2 id="External_links">External links</h2><span class="mw-editsection"> <a role="button" href="/w/index.php?title=AWK&action=edit&section=23" title="Edit section: External links" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div><section class="mf-section-11 collapsible-block" id="mf-section-11"> <style data-mw-deduplicate="TemplateStyles:r1235681985">.mw-parser-output .side-box{margin:4px 0;box-sizing:border-box;border:1px solid #aaa;font-size:88%;line-height:1.25em;background-color:var(--background-color-interactive-subtle,#f8f9fa);display:flow-root}.mw-parser-output .side-box-abovebelow,.mw-parser-output .side-box-text{padding:0.25em 0.9em}.mw-parser-output .side-box-image{padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .side-box-imageright{padding:2px 0.9em 2px 0;text-align:center}@media(min-width:500px){.mw-parser-output .side-box-flex{display:flex;align-items:center}.mw-parser-output .side-box-text{flex:1;min-width:0}}@media(min-width:720px){.mw-parser-output .side-box{width:238px}.mw-parser-output .side-box-right{clear:right;float:right;margin-left:1em}.mw-parser-output .side-box-left{margin-right:1em}}</style><style data-mw-deduplicate="TemplateStyles:r1237033735">@media print{body.ns-0 .mw-parser-output .sistersitebox{display:none!important}}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}</style><div class="side-box side-box-right plainlinks sistersitebox"><style data-mw-deduplicate="TemplateStyles:r1126788409">.mw-parser-output .plainlist ol,.mw-parser-output .plainlist ul{line-height:inherit;list-style:none;margin:0;padding:0}.mw-parser-output .plainlist ol li,.mw-parser-output .plainlist ul li{margin-bottom:0}</style> <div class="side-box-flex"> <div class="side-box-image"><span class="noviewer" typeof="mw:File"><a href="/wiki/File:Wikibooks-logo-en-noslogan.svg" class="mw-file-description"><noscript><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/40px-Wikibooks-logo-en-noslogan.svg.png" decoding="async" width="40" height="40" class="mw-file-element" data-file-width="400" data-file-height="400"></noscript><span class="lazy-image-placeholder" style="width: 40px;height: 40px;" data-mw-src="//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/40px-Wikibooks-logo-en-noslogan.svg.png" data-alt="" data-width="40" data-height="40" data-mw-srcset="//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/60px-Wikibooks-logo-en-noslogan.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/120px-Wikibooks-logo-en-noslogan.svg.png 2x" data-class="mw-file-element"> </span></a></span></div> <div class="side-box-text plainlist">Wikibooks has a book on the topic of: <i><b><a href="https://en.wikibooks.org/wiki/An_Awk_Primer" class="extiw" title="wikibooks:An Awk Primer">An Awk Primer</a></b></i></div></div> </div> <ul><li><a rel="nofollow" class="external text" href="http://doc.cat-v.org/henry_spencer/amazing_awk_assembler/">The Amazing Awk Assembler</a> by <a href="/wiki/Henry_Spencer" title="Henry Spencer">Henry Spencer</a>.</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20220318040955/https://curlie.org/Computers/Programming/Languages/Awk">"AWK (formerly) at Curlie"</a>. <i><a href="/wiki/Curlie" class="mw-redirect" title="Curlie">Curlie</a></i>. Archived from <a rel="nofollow" class="external text" href="https://curlie.org/Computers/Programming/Languages/Awk">the original</a> on 2022-03-18.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Curlie&rft.atitle=AWK+%28formerly%29+at+Curlie&rft_id=https%3A%2F%2Fcurlie.org%2FComputers%2FProgramming%2FLanguages%2FAwk&rfr_id=info%3Asid%2Fen.wikipedia.org%3AAWK" class="Z3988"></span></li> <li><a rel="nofollow" class="external text" href="http://awklang.org">awklang.org</a> The site for things related to the awk language</li> <li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20160403181356/http://awk.info/">Awk Community Portal</a> at the <a href="/wiki/Wayback_Machine" title="Wayback Machine">Wayback Machine</a> (archived 2016-04-03)</li></ul> <div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}</style><style data-mw-deduplicate="TemplateStyles:r1236075235">.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}</style></div> <div class="navbox-styles"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236075235"></div> <div class="navbox-styles"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236075235"><style data-mw-deduplicate="TemplateStyles:r1038841319">.mw-parser-output .tooltip-dotted{border-bottom:1px dotted;cursor:help}</style></div> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐7dbbdd594f‐rl6ln Cached time: 20250405213807 Cache expiry: 2168521 Reduced expiry: true Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 0.591 seconds Real time usage: 0.734 seconds Preprocessor visited node count: 3930/1000000 Post‐expand include size: 117558/2097152 bytes Template argument size: 5014/2097152 bytes Highest expansion depth: 18/100 Expensive parser function count: 24/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 146635/5000000 bytes Lua time usage: 0.345/10.000 seconds Lua memory usage: 7131900/52428800 bytes Number of Wikibase entities loaded: 1/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 611.020 1 -total 18.42% 112.554 1 Template:Reflist 16.73% 102.235 12 Template:Cite_book 12.20% 74.550 2 Template:Navbox 11.89% 72.638 1 Template:Unix_commands 11.43% 69.832 2 Template:Infobox 10.46% 63.884 18 Template:Cite_web 9.50% 58.050 1 Template:Short_description 9.04% 55.214 1 Template:Infobox_programming_language 6.05% 36.965 1 Template:IPAc-en --> <!-- Saved in parser cache with key enwiki:pcache:1456:|#|:idhash:canonical and timestamp 20250405213807 and revision id 1282366375. Rendering was triggered because: page-view --> </section></div> <!-- MobileFormatter took 0.017 seconds --><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://auth.wikimedia.org/loginwiki/wiki/Special:CentralAutoLogin/start?useformat=mobile&type=1x1&usesul3=1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=AWK&oldid=1282366375">https://en.wikipedia.org/w/index.php?title=AWK&oldid=1282366375</a>"</div></div> </div> <div class="post-content" id="page-secondary-actions"> </div> </main> <footer class="mw-footer minerva-footer" role="contentinfo"> <a class="last-modified-bar" href="/w/index.php?title=AWK&action=history"> <div class="post-content last-modified-bar__content"> <span class="minerva-icon minerva-icon-size-medium minerva-icon--modified-history"></span> <span class="last-modified-bar__text modified-enhancement" data-user-name="Susko3" data-user-gender="unknown" data-timestamp="1742947014"> <span>Last edited on 25 March 2025, at 23:56</span> </span> <span class="minerva-icon minerva-icon-size-small minerva-icon--expand"></span> </div> </a> <div class="post-content footer-content"> <div id='mw-data-after-content'> <div class="read-more-container"></div> </div> <div id="p-lang"> <h4>Languages</h4> <section> <ul id="p-variants" class="minerva-languages"></ul> <ul class="minerva-languages"><li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D8%A3%D9%88%D9%83_(%D9%84%D8%BA%D8%A9_%D8%A8%D8%B1%D9%85%D8%AC%D8%A9)" title="أوك (لغة برمجة) – Arabic" lang="ar" hreflang="ar" data-title="أوك (لغة برمجة)" data-language-autonym="العربية" data-language-local-name="Arabic" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-an mw-list-item"><a href="https://an.wikipedia.org/wiki/AWK" title="AWK – Aragonese" lang="an" hreflang="an" data-title="AWK" data-language-autonym="Aragonés" data-language-local-name="Aragonese" class="interlanguage-link-target"><span>Aragonés</span></a></li><li class="interlanguage-link interwiki-ast mw-list-item"><a href="https://ast.wikipedia.org/wiki/AWK" title="AWK – Asturian" lang="ast" hreflang="ast" data-title="AWK" data-language-autonym="Asturianu" data-language-local-name="Asturian" class="interlanguage-link-target"><span>Asturianu</span></a></li><li class="interlanguage-link interwiki-bg mw-list-item"><a href="https://bg.wikipedia.org/wiki/AWK" title="AWK – Bulgarian" lang="bg" hreflang="bg" data-title="AWK" data-language-autonym="Български" data-language-local-name="Bulgarian" class="interlanguage-link-target"><span>Български</span></a></li><li class="interlanguage-link interwiki-bs mw-list-item"><a href="https://bs.wikipedia.org/wiki/Awk" title="Awk – Bosnian" lang="bs" hreflang="bs" data-title="Awk" data-language-autonym="Bosanski" data-language-local-name="Bosnian" class="interlanguage-link-target"><span>Bosanski</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/Awk" title="Awk – Catalan" lang="ca" hreflang="ca" data-title="Awk" data-language-autonym="Català" data-language-local-name="Catalan" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/AWK" title="AWK – Czech" lang="cs" hreflang="cs" data-title="AWK" data-language-autonym="Čeština" data-language-local-name="Czech" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-da mw-list-item"><a href="https://da.wikipedia.org/wiki/AWK_(programmeringssprog)" title="AWK (programmeringssprog) – Danish" lang="da" hreflang="da" data-title="AWK (programmeringssprog)" data-language-autonym="Dansk" data-language-local-name="Danish" class="interlanguage-link-target"><span>Dansk</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Awk" title="Awk – German" lang="de" hreflang="de" data-title="Awk" data-language-autonym="Deutsch" data-language-local-name="German" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-et mw-list-item"><a href="https://et.wikipedia.org/wiki/AWK" title="AWK – Estonian" lang="et" hreflang="et" data-title="AWK" data-language-autonym="Eesti" data-language-local-name="Estonian" class="interlanguage-link-target"><span>Eesti</span></a></li><li class="interlanguage-link interwiki-el mw-list-item"><a href="https://el.wikipedia.org/wiki/AWK" title="AWK – Greek" lang="el" hreflang="el" data-title="AWK" data-language-autonym="Ελληνικά" data-language-local-name="Greek" class="interlanguage-link-target"><span>Ελληνικά</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/AWK" title="AWK – Spanish" lang="es" hreflang="es" data-title="AWK" data-language-autonym="Español" data-language-local-name="Spanish" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/AWK" title="AWK – Persian" lang="fa" hreflang="fa" data-title="AWK" data-language-autonym="فارسی" data-language-local-name="Persian" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/Awk" title="Awk – French" lang="fr" hreflang="fr" data-title="Awk" data-language-autonym="Français" data-language-local-name="French" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-gl mw-list-item"><a href="https://gl.wikipedia.org/wiki/AWK" title="AWK – Galician" lang="gl" hreflang="gl" data-title="AWK" data-language-autonym="Galego" data-language-local-name="Galician" class="interlanguage-link-target"><span>Galego</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/AWK" title="AWK – Korean" lang="ko" hreflang="ko" data-title="AWK" data-language-autonym="한국어" data-language-local-name="Korean" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-hy mw-list-item"><a href="https://hy.wikipedia.org/wiki/AWK" title="AWK – Armenian" lang="hy" hreflang="hy" data-title="AWK" data-language-autonym="Հայերեն" data-language-local-name="Armenian" class="interlanguage-link-target"><span>Հայերեն</span></a></li><li class="interlanguage-link interwiki-hr mw-list-item"><a href="https://hr.wikipedia.org/wiki/AWK" title="AWK – Croatian" lang="hr" hreflang="hr" data-title="AWK" data-language-autonym="Hrvatski" data-language-local-name="Croatian" class="interlanguage-link-target"><span>Hrvatski</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Awk" title="Awk – Italian" lang="it" hreflang="it" data-title="Awk" data-language-autonym="Italiano" data-language-local-name="Italian" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/AWK" title="AWK – Hebrew" lang="he" hreflang="he" data-title="AWK" data-language-autonym="עברית" data-language-local-name="Hebrew" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-lv mw-list-item"><a href="https://lv.wikipedia.org/wiki/AWK" title="AWK – Latvian" lang="lv" hreflang="lv" data-title="AWK" data-language-autonym="Latviešu" data-language-local-name="Latvian" class="interlanguage-link-target"><span>Latviešu</span></a></li><li class="interlanguage-link interwiki-hu mw-list-item"><a href="https://hu.wikipedia.org/wiki/Awk" title="Awk – Hungarian" lang="hu" hreflang="hu" data-title="Awk" data-language-autonym="Magyar" data-language-local-name="Hungarian" class="interlanguage-link-target"><span>Magyar</span></a></li><li class="interlanguage-link interwiki-ms mw-list-item"><a href="https://ms.wikipedia.org/wiki/AWK" title="AWK – Malay" lang="ms" hreflang="ms" data-title="AWK" data-language-autonym="Bahasa Melayu" data-language-local-name="Malay" class="interlanguage-link-target"><span>Bahasa Melayu</span></a></li><li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://nl.wikipedia.org/wiki/AWK" title="AWK – Dutch" lang="nl" hreflang="nl" data-title="AWK" data-language-autonym="Nederlands" data-language-local-name="Dutch" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/AWK" title="AWK – Japanese" lang="ja" hreflang="ja" data-title="AWK" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-no mw-list-item"><a href="https://no.wikipedia.org/wiki/Awk" title="Awk – Norwegian Bokmål" lang="nb" hreflang="nb" data-title="Awk" data-language-autonym="Norsk bokmål" data-language-local-name="Norwegian Bokmål" class="interlanguage-link-target"><span>Norsk bokmål</span></a></li><li class="interlanguage-link interwiki-nn mw-list-item"><a href="https://nn.wikipedia.org/wiki/Awk" title="Awk – Norwegian Nynorsk" lang="nn" hreflang="nn" data-title="Awk" data-language-autonym="Norsk nynorsk" data-language-local-name="Norwegian Nynorsk" class="interlanguage-link-target"><span>Norsk nynorsk</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/AWK" title="AWK – Polish" lang="pl" hreflang="pl" data-title="AWK" data-language-autonym="Polski" data-language-local-name="Polish" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/AWK" title="AWK – Portuguese" lang="pt" hreflang="pt" data-title="AWK" data-language-autonym="Português" data-language-local-name="Portuguese" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ro mw-list-item"><a href="https://ro.wikipedia.org/wiki/AWK" title="AWK – Romanian" lang="ro" hreflang="ro" data-title="AWK" data-language-autonym="Română" data-language-local-name="Romanian" class="interlanguage-link-target"><span>Română</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/AWK" title="AWK – Russian" lang="ru" hreflang="ru" data-title="AWK" data-language-autonym="Русский" data-language-local-name="Russian" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-simple mw-list-item"><a href="https://simple.wikipedia.org/wiki/Awk" title="Awk – Simple English" lang="en-simple" hreflang="en-simple" data-title="Awk" data-language-autonym="Simple English" data-language-local-name="Simple English" class="interlanguage-link-target"><span>Simple English</span></a></li><li class="interlanguage-link interwiki-sk mw-list-item"><a href="https://sk.wikipedia.org/wiki/AWK" title="AWK – Slovak" lang="sk" hreflang="sk" data-title="AWK" data-language-autonym="Slovenčina" data-language-local-name="Slovak" class="interlanguage-link-target"><span>Slovenčina</span></a></li><li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://sr.wikipedia.org/wiki/AWK" title="AWK – Serbian" lang="sr" hreflang="sr" data-title="AWK" data-language-autonym="Српски / srpski" data-language-local-name="Serbian" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-sh mw-list-item"><a href="https://sh.wikipedia.org/wiki/AWK" title="AWK – Serbo-Croatian" lang="sh" hreflang="sh" data-title="AWK" data-language-autonym="Srpskohrvatski / српскохрватски" data-language-local-name="Serbo-Croatian" class="interlanguage-link-target"><span>Srpskohrvatski / српскохрватски</span></a></li><li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://fi.wikipedia.org/wiki/AWK" title="AWK – Finnish" lang="fi" hreflang="fi" data-title="AWK" data-language-autonym="Suomi" data-language-local-name="Finnish" class="interlanguage-link-target"><span>Suomi</span></a></li><li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://sv.wikipedia.org/wiki/Awk" title="Awk – Swedish" lang="sv" hreflang="sv" data-title="Awk" data-language-autonym="Svenska" data-language-local-name="Swedish" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-th mw-list-item"><a href="https://th.wikipedia.org/wiki/%E0%B8%A0%E0%B8%B2%E0%B8%A9%E0%B8%B2%E0%B8%AD%E0%B8%AD%E0%B8%A7%E0%B9%8C%E0%B8%81" title="ภาษาออว์ก – Thai" lang="th" hreflang="th" data-title="ภาษาออว์ก" data-language-autonym="ไทย" data-language-local-name="Thai" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-tg mw-list-item"><a href="https://tg.wikipedia.org/wiki/AWK" title="AWK – Tajik" lang="tg" hreflang="tg" data-title="AWK" data-language-autonym="Тоҷикӣ" data-language-local-name="Tajik" class="interlanguage-link-target"><span>Тоҷикӣ</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/AWK" title="AWK – Turkish" lang="tr" hreflang="tr" data-title="AWK" data-language-autonym="Türkçe" data-language-local-name="Turkish" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/AWK" title="AWK – Ukrainian" lang="uk" hreflang="uk" data-title="AWK" data-language-autonym="Українська" data-language-local-name="Ukrainian" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/AWK" title="AWK – Vietnamese" lang="vi" hreflang="vi" data-title="AWK" data-language-autonym="Tiếng Việt" data-language-local-name="Vietnamese" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://zh-yue.wikipedia.org/wiki/Awk" title="Awk – Cantonese" lang="yue" hreflang="yue" data-title="Awk" data-language-autonym="粵語" data-language-local-name="Cantonese" class="interlanguage-link-target"><span>粵語</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/AWK" title="AWK – Chinese" lang="zh" hreflang="zh" data-title="AWK" data-language-autonym="中文" data-language-local-name="Chinese" class="interlanguage-link-target"><span>中文</span></a></li></ul> </section> </div> <div class="minerva-footer-logo"> <img src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" alt="Wikipedia" width="120" height="18" style="width: 7.5em; height: 1.125em;"/> <ul id="footer-icons" class="footer-icons"> <li id="footer-copyrightico"><a href="https://www.wikimedia.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><picture><source media="(min-width: 500px)" srcset="/static/images/footer/wikimedia-button.svg" width="84" height="29"><img src="/static/images/footer/wikimedia.svg" width="25" height="25" alt="Wikimedia Foundation" lang="en" loading="lazy"></picture></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><picture><source media="(min-width: 500px)" srcset="/w/resources/assets/poweredby_mediawiki.svg" width="88" height="31"><img src="/w/resources/assets/mediawiki_compact.svg" alt="Powered by MediaWiki" lang="en" width="25" height="25" loading="lazy"></picture></a></li> </ul> </div> <ul id="footer-info" class="footer-info hlist hlist-separated"> <li id="footer-info-lastmod"> This page was last edited on 25 March 2025, at 23:56<span class="anonymous-show"> (UTC)</span>.</li> <li id="footer-info-copyright">Content is available under <a class="external" rel="nofollow" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">CC BY-SA 4.0</a> unless otherwise noted.</li> </ul> <ul id="footer-places" class="footer-places hlist hlist-separated"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-terms-use"><a href="https://foundation.m.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">Terms of Use</a></li> <li id="footer-places-desktop-toggle"><a id="mw-mf-display-toggle" href="//en.wikipedia.org/w/index.php?title=AWK&mobileaction=toggle_view_desktop" data-event-name="switch_to_desktop">Desktop</a></li> </ul> </div> </footer> </div> </div> <div class="mw-portlet mw-portlet-dock-bottom emptyPortlet" id="p-dock-bottom"> <ul> </ul> </div> <div class="mw-notification-area" data-mw="interface"></div> <!-- v:8.3.1 --> <script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-58799fd575-ksvvs","wgBackendResponseTime":242,"wgPageParseReport":{"limitreport":{"cputime":"0.591","walltime":"0.734","ppvisitednodes":{"value":3930,"limit":1000000},"postexpandincludesize":{"value":117558,"limit":2097152},"templateargumentsize":{"value":5014,"limit":2097152},"expansiondepth":{"value":18,"limit":100},"expensivefunctioncount":{"value":24,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":146635,"limit":5000000},"entityaccesscount":{"value":1,"limit":400},"timingprofile":["100.00% 611.020 1 -total"," 18.42% 112.554 1 Template:Reflist"," 16.73% 102.235 12 Template:Cite_book"," 12.20% 74.550 2 Template:Navbox"," 11.89% 72.638 1 Template:Unix_commands"," 11.43% 69.832 2 Template:Infobox"," 10.46% 63.884 18 Template:Cite_web"," 9.50% 58.050 1 Template:Short_description"," 9.04% 55.214 1 Template:Infobox_programming_language"," 6.05% 36.965 1 Template:IPAc-en"]},"scribunto":{"limitreport-timeusage":{"value":"0.345","limit":"10.000"},"limitreport-memusage":{"value":7131900,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-7dbbdd594f-rl6ln","timestamp":"20250405213807","ttl":2168521,"transientcontent":true}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"AWK","url":"https:\/\/en.wikipedia.org\/wiki\/AWK","sameAs":"http:\/\/www.wikidata.org\/entity\/Q213970","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q213970","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2001-08-20T21:09:03Z","dateModified":"2025-03-25T23:56:54Z","image":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/d\/d5\/The-AWK-Programming-Language.svg","headline":"data-driven programming language made by Alfred Aho, Peter Weinberger and Brian Kernighan"}</script><script>(window.NORLQ=window.NORLQ||[]).push(function(){var ns,i,p,img;ns=document.getElementsByTagName('noscript');for(i=0;i<ns.length;i++){p=ns[i].nextSibling;if(p&&p.className&&p.className.indexOf('lazy-image-placeholder')>-1){img=document.createElement('img');img.setAttribute('src',p.getAttribute('data-mw-src'));img.setAttribute('width',p.getAttribute('data-width'));img.setAttribute('height',p.getAttribute('data-height'));img.setAttribute('alt',p.getAttribute('data-alt'));p.parentNode.replaceChild(img,p);}}});</script> </body> </html>