<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Bash on Nasty Tester</title><link>https://nastytester.com/tags/bash.html</link><description>Recent content in Bash on Nasty Tester</description><generator>Hugo</generator><language>en-us</language><copyright>Nasty Tester</copyright><lastBuildDate>Mon, 12 Jan 2026 21:48:36 +1300</lastBuildDate><atom:link href="https://nastytester.com/tags/bash/index.xml" rel="self" type="application/rss+xml"/><item><title>ba.sh: A minimal pattern for organising bash code</title><link>https://nastytester.com/posts/bash-oop-framework.html</link><pubDate>Mon, 12 Jan 2026 21:48:36 +1300</pubDate><guid>https://nastytester.com/posts/bash-oop-framework.html</guid><description>When you hear &amp;ldquo;bash OOP framework&amp;rdquo;, what comes to mind? Probably complexity, overhead, fighting the language. But what if it didn&amp;rsquo;t have to be that way? If you&amp;rsquo;ve written bash scripts for any length of time, you know how it can go. It starts simple: a few commands in a file. Then you add a function. Then another. Then some variables. Before you know it, you have 500 lines of tangled code where everything can access everything, functions have names you don&amp;rsquo;t remember, and you&amp;rsquo;re scared to change anything because you don&amp;rsquo;t know what might break.</description></item><item><title>Calculating netmask in bash</title><link>https://nastytester.com/posts/calculating-netmask-in-bash.html</link><pubDate>Fri, 05 Dec 2025 23:44:36 +1300</pubDate><guid>https://nastytester.com/posts/calculating-netmask-in-bash.html</guid><description>A subnet mask is a set of bits that determines how many bits are used to specify the subnet address and how many are used to specify the computer address within that subnet. It&amp;rsquo;s more common to see a subnet mask in decimal notation, but it&amp;rsquo;s actually represented in binary. If you understand how a subnet address and a computer address within that subnet are represented, you can easily determine the subnet address and subnet mask from the computer address and subnet mask, as follows: &amp;lt;subnet-address&amp;gt;/&amp;lt;number-of-bits&amp;gt;</description></item><item><title>Script that works in Windows and Linux</title><link>https://nastytester.com/posts/script-that-works-in-windows-and-linux.html</link><pubDate>Sun, 10 Mar 2019 18:51:08 +1300</pubDate><guid>https://nastytester.com/posts/script-that-works-in-windows-and-linux.html</guid><description>When you work with computers that run different operating systems, such as Linux and Windows, then you probably have some similar tasks you execute in both of them. And for each operating system you write a separate script. Or may be you write programs in Java and for each operating system you have a script to set up an environment (sh-script or cmd-script). If you need to do basically the same in Windows and in Linux, you can write only one script, that will work in both operating systems.</description></item></channel></rss>