med-mastodon.com is one of the many independent Mastodon servers you can use to participate in the fediverse.
Medical community on Mastodon

Administered by:

Server stats:

363
active users

#awk

0 posts0 participants0 posts today
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>
חנן כהן • Hanan Cohen<p>I am using <a href="https://tooot.im/tags/AWK" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>AWK</span></a> for only one command. </p><p>ia tasks | awk -F "identifier" "{s+=(NF-1)} END {print s}"</p><p>It counts my Internet Archive tasks that are currently running.</p><p>Now that I have a new computer, I didn't want to install AWK for just one command. I asked Claude to write me the same command for PowerShell. </p><p>(ia tasks | ForEach-Object { ($_ -split "identifier").Count - 1 } | Measure-Object -Sum).Sum </p><p>Sad to say goodby to AWK. It was very useful to me three jobs ago.</p>
lj·rk<p>Maybe I'm just too tired to find a way for `podlet` to write it's output to multiple files if there are multiple files to generate. E.g., if a compose file would result in multiple quadlet `.container` files.</p><p>Fortunately, <a href="https://todon.eu/tags/AWK" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>AWK</span></a> is just an amazing tool and let's me write an ultra-simple state-machine to transform podlet's output into multiple files. Use with:</p><p>```<br>podlet compose ./path/to/complex.compose | awk -f podlet_stdout_to_files.awk<br>```</p><p>The AWK script:</p><p>```<br>BEGIN { state="filename" }<br>/^# / { if (state == "filename") { filename=$2; state="unit"; } else { print "unexpected filename"; exit 1; } }<br>/^---$/ { if (state == "unit") { state="filename" } else { print "unexpected end-of-unit marker"; exit 1; } }<br> { if (state == "unit") { print $0 &gt;&gt; filename } }<br>```</p><p>Without error handling:</p><p>```<br>BEGIN { state="filename" }<br>/^# / { filename=$2; state="unit" }<br>/^---$/ { state="filename" }<br> { if (state == "unit") { print $0 &gt;&gt; filename } }<br>```</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>
PitWD<p>Das <a href="https://nrw.social/tags/Bloat" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Bloat</span></a> Prinzip vs. <a href="https://nrw.social/tags/KISS" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>KISS</span></a> Prinzip.</p><p>Links <a href="https://nrw.social/tags/VScode" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>VScode</span></a> - Rechts <a href="https://nrw.social/tags/Nano" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Nano</span></a>.</p><p>Sprache:<br><a href="https://nrw.social/tags/Bash" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Bash</span></a> mit embedded <a href="https://nrw.social/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a></p><p>Aus Bash Sicht ist das "awk in aqua Farbe" in <a href="https://nrw.social/tags/code" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>code</span></a> OK. Aber optisch nicht besonders prickelnd.</p><p>Nano hingegen interpretiert die embedding Hochkommas nicht und colorriert fleißig weiter... Aus bash Sicht nicht OK - aber sehr geil zu lesen.</p><p>Ersten 500 Zeilen habe ich in nano via <a href="https://nrw.social/tags/ssh" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ssh</span></a> aufm <a href="https://nrw.social/tags/RaspberryPi" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>RaspberryPi</span></a> gemacht - dann in code weiter - was hab ich mich erschreckt...🤪</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>
tiagoafpereira 🚲📷⌨️<p>On migrating from Pocket, file conversions and link rot.</p><p>Learned a few things about <a href="https://mastodon.social/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a> and <a href="https://mastodon.social/tags/gawk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>gawk</span></a> and ended up picking <a href="https://mastodon.social/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> to get it done.</p><p><a href="https://tiagoafpereira.net/blog/posts/2025-06-04-migrating-from-pocket/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">tiagoafpereira.net/blog/posts/</span><span class="invisible">2025-06-04-migrating-from-pocket/</span></a></p><p><a href="https://mastodon.social/tags/pocket" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pocket</span></a> <a href="https://mastodon.social/tags/linkding" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>linkding</span></a> <a href="https://mastodon.social/tags/migration" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>migration</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>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>
Simon Wolf<p>Since they are shutting down soon, yesterday evening I downloaded my Pocket data and, because I have weird compulsions, decided to use <a href="https://social.sgawolf.com/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a> to parse the very simple CSV file into a very simple Markdown file.</p><p>And then, because my previous, equally niche, AWK post had been oddly popular, I wrote about this new script too: <a href="https://blog.sgawolf.com/post/2025-05-22-pocket-parser" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">blog.sgawolf.com/post/2025-05-</span><span class="invisible">22-pocket-parser</span></a></p>
Willem Van den Ende - Writing<p><a href="https://mastodon.social/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a> is still alive `mix test | awk 'BEGIN { print_next = 0 } { if (print_next) { print; print_next = 0 } else if ($0 ~ /^ *[0-9]+\)/) { print; print_next = 1 } }'</p><p>`mix test` is for running elixir tests. I've got too many failures at the moment and wanted to see all of them, with the file / line number. cc <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> </p><p>This is not awk I could have easily written by hand.</p><p>(but admittedly, for stuff with conditionals etc, there is a lot more <a href="https://mastodon.social/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> in the training sets).</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>
Continued thread

What's useful about Perl is that it fits the Unix tools approach well. You can write quick one-liners and put them in a pipeline. You then gradually enhance functionality until you arrive at a standalone script. Like Shell. Like AWK. Ruby is kind of like that as well. Python is not.

This doesn't mean the opposite works equally well. The bare minimum to turn a language's REPL into an interactive Shell is I/O redirection and pipelines without much extra syntax.

#shell#perl#awk

Hey beloved #noGooMe users,

A quick reminder that you *must* have the proxy image option unchecked when using this #SearxNG 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.

It is disabled by default so any first connection to this instance has the proper setting set up.

If you do have it enabled, you’ll quickly be blocked at the firewall level by our #awk AI agent 🤖

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.

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.

I still can't believe that most programming systems we use today are preoccupied with numbers. AFAIK, half of (R5RS?) #Scheme standard is numbers and operations on them. Same for #C, #CommonLisp, #Java—ten different types of numbers and huge libraries for them.

Humans think in images and words. Structured text-oriented languages feel like a much better fit for everyone not corrupted by C. Yet we have little to no popular attempts in that space. Structured Regular Expressions didn't catch up; #ed1 and #awk are considered mere #regex automation tools. Modal and the term rewriting systems have their Merveilles Town, but not much beyond. sh/#bash and the like are quite successful, but aren't considered real programming languages either.

Why.