eupolicy.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
This Mastodon server is a friendly and respectful discussion space for people working in areas related to EU policy. When you request to create an account, please tell us something about you.

Server stats:

205
active users

#awk

1 post1 participant0 posts today
Tim Chase<p>My love for <a href="https://mastodon.bsd.cafe/tags/plaintext" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>plaintext</span></a> and <a href="https://mastodon.bsd.cafe/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a> (as well as other Unix text-processing tools) was rejuvenated by a recent nerdsnipe¹ problem someone shared.</p><p>They had a WordGrinder² file which is a container-type format that can hold multiple documents (such as multiple individual chapters of a book) in the same document file. As far as we could tell, there's no native way to flatten all those sub-documents into a flat single file, and there was no way to export them into a multipart output document.</p><p>Fortunately, that WordGrinder file format is just plaintext. It didn't take more than ~10 minutes to reverse-engineer the basics of the file-format and then cobble together an awk(1) one-liner to do the flattening. Worked perfectly on the first try.</p><p>⸻<br>¹ <a href="https://www.reddit.com/r/commandline/comments/1nkxz4t/is_there_any_way_to_massexport_a_document_set_in/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">reddit.com/r/commandline/comme</span><span class="invisible">nts/1nkxz4t/is_there_any_way_to_massexport_a_document_set_in/</span></a></p><p>² <a href="http://cowlark.com/wordgrinder/index.html" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">http://</span><span class="ellipsis">cowlark.com/wordgrinder/index.</span><span class="invisible">html</span></a></p>
🌈 ☯️Teresita🐧👭<p>Print every word in the Bible that follows 'thou shalt not' with <a href="https://techhub.social/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a> #38 </p><p>awk '{n=split(tolower($0),a,"thou shalt not "); if(n&gt;1){split(a[n],b,/[^a-z]+/); print b[1]}}' kjv.txt | sort -u</p>
Jared Jennings<p><a href="https://j.agrue.info/glotawk-a-lisp-implemented-in-awk.html" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">j.agrue.info/glotawk-a-lisp-im</span><span class="invisible">plemented-in-awk.html</span></a></p><p><a href="gemini://j.agrue.info/glotawk-a-lisp-implemented-in-awk.gmi" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible"></span><span class="ellipsis">gemini://j.agrue.info/glotawk-</span><span class="invisible">a-lisp-implemented-in-awk.gmi</span></a></p><p><a href="https://mastodon.bsd.cafe/tags/lisp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>lisp</span></a> <a href="https://mastodon.bsd.cafe/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a> <a href="https://mastodon.bsd.cafe/tags/mal" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mal</span></a> <a href="https://mastodon.bsd.cafe/tags/LispFromNothing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>LispFromNothing</span></a> <span class="h-card" translate="no"><a href="https://mastodon.social/@AverageDog" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>AverageDog</span></a></span></p>
Space Hobo<p><span class="h-card" translate="no"><a href="https://mastodon.social/@timonus" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>timonus</span></a></span> <span class="h-card" translate="no"><a href="https://hachyderm.io/@thomasfuchs" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>thomasfuchs</span></a></span> <span class="h-card" translate="no"><a href="https://f.duriansoftware.com/@joe" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>joe</span></a></span> submitted for the committee's approval <a href="https://teh.entar.net/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a></p>
ƧƿѦςɛ♏ѦਹѤʞ<p><span class="h-card" translate="no"><a href="https://tinkerbetter.tube/accounts/vkc" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>vkc</span></a></span> <br>Did anybody else used to write websites using awk or was it just me?<br>🙂 <br><a href="https://mastodon.social/tags/WebEditing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WebEditing</span></a> <a href="https://mastodon.social/tags/WebDev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WebDev</span></a> <a href="https://mastodon.social/tags/WWW" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WWW</span></a> <a href="https://mastodon.social/tags/AWK" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>AWK</span></a> <a href="https://mastodon.social/tags/RetroComputing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>RetroComputing</span></a></p>
Digital Mark λ ☕️ 🎃 💀<p>Batman gonna do some text processing on this guy.<br><a href="https://appdot.net/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a></p>
Space Hobo<p>That <a href="https://teh.entar.net/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a> script is someone's fork of `guff` ("a plot(1) device") that I've carried around for a while. It takes in columns of numbers on stdin and spits out an SVG plot with reasonable defaults. Damned handy.</p>
JdeBP<p><span class="h-card" translate="no"><a href="https://hachyderm.io/@simontatham" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>simontatham</span></a></span> </p><p>Do you run a mile from almost all <a href="https://tty0.social/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a> variants? (-:</p><p>Those have an escaping deficiency (save perhaps BSD awk where -F takes a regular expression) that almost no-one seems to deal with.</p><p>Few people realize that /etc/fstab in <a href="https://tty0.social/tags/FreeBSD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>FreeBSD</span></a> is actually vis(3)-encoded, meaning that whitespace can never occur as field data, however one must unvis each field to work correctly.</p><p>There is a very obscure hint to this at the foot of the fstab(5) manual page.</p><p><a href="https://github.com/freebsd/freebsd-src/blob/main/lib/libc/gen/fstab.c#L151" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/freebsd/freebsd-src</span><span class="invisible">/blob/main/lib/libc/gen/fstab.c#L151</span></a></p><p><span class="h-card" translate="no"><a href="https://social.treehouse.systems/@ska" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>ska</span></a></span></p>
DrScriptt<p>I wrote some <a href="https://oldbytes.space/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a> to parse output from `show interface` on <a href="https://oldbytes.space/tags/Cisco" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Cisco</span></a> IOS devices this evening as one does.</p><p>It expands the ~27 lines of dense text with multiple values on each line to be 68 discrete data points that can be worked with.</p>
Mariette Timmer<p>Awk: Hack the planet['s text]! (Presentation) - 2023 Update</p><p><a href="https://youtube.com/watch?v=E5aQxIdjT0M&amp;si=Cz2fpA_qnFh9F9eN" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">youtube.com/watch?v=E5aQxIdjT0</span><span class="invisible">M&amp;si=Cz2fpA_qnFh9F9eN</span></a></p><p><a href="https://mastodon.nl/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a></p>
Linux Magazine<p>Looking for stats? Pete Metcalfe shows you how to quickly analyze and plot your data with just one line of Bash and tools like AWK and gnuplot<br><a href="https://www.linux-magazine.com/Issues/2025/294/Bash-Stats?utm_source=mlm" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">linux-magazine.com/Issues/2025</span><span class="invisible">/294/Bash-Stats?utm_source=mlm</span></a><br><a href="https://fosstodon.org/tags/Bash" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Bash</span></a> <a href="https://fosstodon.org/tags/tools" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>tools</span></a> <a href="https://fosstodon.org/tags/AWK" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>AWK</span></a> <a href="https://fosstodon.org/tags/gnuplot" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>gnuplot</span></a> <a href="https://fosstodon.org/tags/Linux" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Linux</span></a> <a href="https://fosstodon.org/tags/stats" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>stats</span></a> <a href="https://fosstodon.org/tags/data" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>data</span></a> <a href="https://fosstodon.org/tags/SQL" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SQL</span></a></p>
Space Hobo<p><span class="h-card" translate="no"><a href="https://graphics.social/@metin" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>metin</span></a></span> I see you and raise you <a href="https://teh.entar.net/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a> on a terminal: <a href="https://github.com/patsie75/awk-demo" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/patsie75/awk-demo</span><span class="invisible"></span></a></p>
Slatian<p>Hey xdg-shell-linux fedi corner :drgn: </p><p>I need some eyes on this code here: <a href="https://gitlab.freedesktop.org/xdg/xdg-utils/-/merge_requests/147" rel="nofollow noopener" target="_blank">https://gitlab.freedesktop.org/xdg/xdg-utils/-/merge_requests/147</a></p><p><a class="hashtag" href="https://pleroma.envs.net/tag/linux" rel="nofollow noopener" target="_blank">#linux</a> <a class="hashtag" href="https://pleroma.envs.net/tag/awk" rel="nofollow noopener" target="_blank">#awk</a> <a class="hashtag" href="https://pleroma.envs.net/tag/freedesktop" rel="nofollow noopener" target="_blank">#freedesktop</a> <a class="hashtag" href="https://pleroma.envs.net/tag/xdg" rel="nofollow noopener" target="_blank">#xdg</a> <a class="hashtag" href="https://pleroma.envs.net/tag/xdgutils" rel="nofollow noopener" target="_blank">#xdgutils</a> <a class="hashtag" href="https://pleroma.envs.net/tag/shell" rel="nofollow noopener" target="_blank">#shell</a></p>
Space Hobo<p>Hey <a href="https://teh.entar.net/tags/entr" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>entr</span></a> fans: are there any examples of a `$ENTR_STATUS_SCRIPT` script out in the wild, or any explanation for what this feature was meant to do? It seems like it could be useful, and I'm a huge fan of <a href="https://teh.entar.net/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a>, but I can't find anyone explaining what they do with it.</p>
SebasTEAan<p>I created some code to reformat the output of ip --brief to look a bit cleaner (IMO).</p><p>You can find the code in <a href="https://github.com/SebastianMeisel/mybashrc" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/SebastianMeisel/myb</span><span class="invisible">ashrc</span></a> .</p><p><a href="https://linuxrocks.online/tags/ip" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ip</span></a> <a href="https://linuxrocks.online/tags/ipv6" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ipv6</span></a> <a href="https://linuxrocks.online/tags/bash" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>bash</span></a> <a href="https://linuxrocks.online/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a> <a href="https://linuxrocks.online/tags/cli" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>cli</span></a></p>
Tim Chase<p>TIL that modifying NF in <a href="https://mastodon.bsd.cafe/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a> has an instant effect, so if you do</p><p>$ echo a b c | awk '{while (NF){print $(NF--)}}'</p><p>the post-decrementing removes the entry before the variable gets accessed, resulting in it printing blanks, so instead you have to access the variable before doing the post-decrement:</p><p>$ echo a b c | awk '{while (NF){print $NF; NF--}}'</p><p>to print each item in reverse.</p><p>Which seems weird given what I understand about how post-decrement is *supposed* to work.</p><p>(HT: <span class="h-card" translate="no"><a href="https://oldbytes.space/@drscriptt" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>drscriptt</span></a></span> whose <a href="https://mastodon.bsd.cafe/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a> sent me down this rabbit-hole of learning)</p>
DrScriptt<p><span class="h-card" translate="no"><a href="https://mastodon.bsd.cafe/@gumnos" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>gumnos</span></a></span> That didn't quite work, but I did get it to work.</p><p>Here's what I have:</p><p>awk -F. '{for (C=NF;C; C--){printf "%s.", $C}; printf "oid."}'</p><p>NF-1 was missing a component.</p><p>I also added curly braces around the 1st printf to make it more obvious what the for loop applied to.</p><p>I wasn't aware that the for loop only applied to the very next instruction. <a href="https://oldbytes.space/tags/TIL" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TIL</span></a> <a href="https://oldbytes.space/tags/AWK" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>AWK</span></a></p>
DrScriptt<p>Well I did a thing.</p><p>I created a <a href="https://oldbytes.space/tags/DNS" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DNS</span></a> zone; .oid, on my DNS server <a href="https://oldbytes.space/tags/OIDs" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>OIDs</span></a>.</p><p>I can now easily look up OID values with dig (et al.):</p><p>% dig +short txt 2.3.7.5.5.1.6.3.1.oid.</p><p>To look up OIS 1.3.6.1.5.5.7.3.2.</p><p>I also wrote a one* line shell script to make doing the lookups easier:</p><p>\dig +short txt $(echo ${1} | awk -F. '{for (C=NF; C&gt;1; C--){printf "%s.", $C}; printf "%s.oid.", $1}') | sed 's/"//g' <a href="https://oldbytes.space/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a></p><p>So I can now run:</p><p>% oidlookup 1.3.6.1.5.5.7.3.2</p><p>and get the following output:</p><p>{iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) pkix(7) kp(3) id-kp-clientAuth(2)}</p>
Willem Van den Ende - Writing<p>Enjoyed <span class="h-card" translate="no"><a href="https://mastodon.social/@kevlin" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>kevlin</span></a></span> on 'past and future of programming languages' yesterday. I am an outlier, I programmed in three languages outside the top 20 this week - <a href="https://mastodon.social/tags/elixir" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>elixir</span></a>, <a href="https://mastodon.social/tags/lisp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>lisp</span></a> (emacs) and <a href="https://mastodon.social/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a> (it comes bundled with most linux, and I have it on mac as well). Strangely enough, a local <a href="https://mastodon.social/tags/llm" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>llm</span></a> makes the latter two more approachable. qwen3:30 is quite good at generating awk, and good enough to get almost-working <a href="https://mastodon.social/tags/emacs" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>emacs</span></a> lisp.</p>
NoGoo.me<p>Hey beloved <a href="https://gts.nogoo.me/tags/nogoome" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>noGooMe</span></a> users,<br><br>A quick reminder that you *must* have the proxy image option unchecked when using this <a href="https://gts.nogoo.me/tags/searxng" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SearxNG</span></a> instance. It can be disabled, if you previously had it enabled, browsing to /preferences, then selecting the "privacy" tab and uncheck the "image proxy" switch.<br><br>It is disabled by default so any first connection to this instance has the proper setting set up.<br><br>If you do have it enabled, you’ll quickly be blocked at the firewall level by our <a href="https://gts.nogoo.me/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a> AI agent 🤖<br><br>My reason for disabling this feature is that it generates loads of requests from the instance IP to the external engines. And this makes those block us really fast.<br><br>This means that the engines will have *your IP* logged when you search for images, only. Classical text search are still masqueraded with our instance IP.</p>