{"id":58,"date":"2009-09-25T04:00:00","date_gmt":"2009-09-25T04:00:00","guid":{"rendered":"https:\/\/kristau.net\/blog\/?p=58"},"modified":"2009-09-25T04:00:00","modified_gmt":"2009-09-25T04:00:00","slug":"fun-with-regex-linux-source-2-6-28-if-you-seek-amy-edition","status":"publish","type":"post","link":"https:\/\/kristau.net\/blog\/58\/","title":{"rendered":"Fun with REGEX: linux-source-2.6.28 &#8220;If You Seek Amy&#8221; edition"},"content":{"rendered":"<p>Studying for <span class=\"caps\">LPI<\/span> certification this evening, and I had a fit of whimsy whilst playing with regular expressions. Random thoughts passing through my head resulted in the following combination of \u201cmemes\u201d:<\/p>\n<ul>\n<li>Swear words in the linux kernel source code.<\/li>\n<li>Britney Spears\u2019 song, \u201cIf You Seek Amy.\u201d<\/li>\n<\/ul>\n<p>So I downloaded the source code (linux-source-2.6.28, Ubuntu), unzipped it and ran the following grep command against it:<\/p>\n<pre><code>grep -ri \"&lt;fuck me&gt;\" *\n<\/code><\/pre>\n<p>Amazingly, despite the <a href=\"http:\/\/www.vidarholen.net\/contents\/wordcount\/\">prevalence<\/a> of the just the <a href=\"http:\/\/durak.org\/sean\/pubs\/kfc\/\">swear word itself<\/a> (33 variations including fuck, fucked, fucking, fucker, etc in 2.6.28) in the kernel, there was only one hit:<\/p>\n<pre><code>fs\/binfmt_aout.c:               \/* Fuck me plenty... *\/\n<\/code><\/pre>\n<p>So I guess a more apt title for this post is, \u201cIf you seek Amy Plenty.\u201d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Studying for LPI certification this evening, and I had a fit of whimsy whilst playing with regular expressions. Random thoughts passing through my head resulted in the following combination of \u201cmemes\u201d: Swear words in the linux kernel source code. Britney Spears\u2019 song, \u201cIf You Seek Amy.\u201d So I downloaded the source code (linux-source-2.6.28, Ubuntu), unzipped [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,7,10],"tags":[86,120,223],"class_list":["post-58","post","type-post","status-publish","format-standard","hentry","category-linux","category-technology","category-writings","tag-fuck","tag-linux-source","tag-writings-2"],"_links":{"self":[{"href":"https:\/\/kristau.net\/blog\/wp-json\/wp\/v2\/posts\/58","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kristau.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kristau.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kristau.net\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/kristau.net\/blog\/wp-json\/wp\/v2\/comments?post=58"}],"version-history":[{"count":0,"href":"https:\/\/kristau.net\/blog\/wp-json\/wp\/v2\/posts\/58\/revisions"}],"wp:attachment":[{"href":"https:\/\/kristau.net\/blog\/wp-json\/wp\/v2\/media?parent=58"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kristau.net\/blog\/wp-json\/wp\/v2\/categories?post=58"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kristau.net\/blog\/wp-json\/wp\/v2\/tags?post=58"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}