#shellscripts

Haack’s Networkingoemb1905@gnulinux.social
2025-12-26

Haack's Networking - Informal Hacking Session #03

1) Today's agenda is rsnapshot script/stack migration from backup 8700 machine to 7920, i.e., to backup the backup.

2) Write the article for the bind9 authoritative DNS server.

3) If time and/or stamina permits, we will work on this month's timbre post where I cover my month's listening history.

Live Steam w/ Chat: content.haacksnetworking.org/w

#livestream #live #gnulinux #sysadmin #floss #freesoftware #rsync #rsnapshot #shellscripts

Haack's Networking logo, which is two hs side by side
Karl Voit :emacs: :orgmode:publicvoit@graz.social
2025-11-06

The more I adapt #chezmoi for my setup (will still take ages!), the more I like this tool. 👍

All of my special requirements could be addressed so far in a clean/reasonable way. And I do have plenty weird requirements. 🤓

It's made for #dotfile management but it is more versatile than that. For example, I'll manage most (if not all) of my personal #shellscripts with that as well.

2025-10-31

Had a blog post do really well this month, unexpectedly gave a talk at @longhorn, learned some lessons about tech and US fascism, and clicked some more links. My notes from October 2025: evanhahn.com/notes-from-octobe

#USPol #programming #ShellScripts #PHP #ICE

2025-10-22

Published a big list of scripts I've written over the years: "copy" and "pasta" for working with the clipboard, "getsong" to download music, "murder" for stopping processes, and dozens more: evanhahn.com/scripts-i-wrote-t

#programming #terminal #scripting #ShellScripts

Mostly, when I'm writing #ShellScripts, I use #BASH. However, sometimes, a script that works just fine on my desktop will fail when run from within a #Docker #container. So, I'll use #podman to fire up the selected container to debug my script within (like so):

podman run  -it --entrypoint /bin/sh docker.io/python:3.12-alpine
Usually, the problem with my script is that it wants BASH but, particularly Alpine-based containers, only have #ASH. So, I'll have to re-work my script to be ASH-compatible (which usually means a script that's a lot less terse).

R.L. Dane :Debian: :OpenBSD: :FreeBSD: 🍵 :MiraLovesYou:rl_dane@polymaths.social
2025-07-07

In the helpful shell functions department:

(Requires bc to be installed)

load() {
    local load=$(uptime |sed -E "s/^.*load averages?: //; s/,.*$//")
    local uname="$(uname)"
    local cpus
    if [[ $1 == -q ]]; then
        echo "$load"
    elif [[ $1 == -i ]]; then
        echo "$load + 0.5" |bc -l |cut -f1 -d.
    else
        case "$uname" in
            Linux)  cpus=$(grep -c ^processor /proc/cpuinfo);;
            *BSD)   cpus=$(sysctl hw.ncpu |tr -dc "0-9\n");;
            *)      warn "load(): assuming 1 cpu, don't know how to get the number in \"$uname\""
                    cpus=1;;
        esac
        local loadPerCPU=$(echo "scale=3; $load / $cpus" |bc -l |sed 's/^\./0./')
        echo "$load ($loadPerCPU per processor ($cpus))"
    fi
}

#ShellScripting #UnixShell #ShellScripts #bash #ksh #sh

2025-06-17
unixbhaskarunixbhaskar
2025-06-17

Ich bin mir gerade noch nicht sicher ob ich #nodejs für #shellscripts cool oder pervers finden soll...

N-gated Hacker Newsngate
2025-05-27

🚀 Wow, the future is here: Now your terminal can run tools using a language model. Congratulations, you’ve just reinvented shell scripts with extra steps and a sprinkle of AI magic. 🎩✨ Why automate with simplicity when you can overcomplicate it with 0.26? 🍾🤖
simonwillison.net/2025/May/27/

N-gated Hacker Newsngate
2025-04-05

🤖 output on serial console with shell scripts in 2019? Groundbreaking! 🎉 Who knew stringing together , Expect, and named pipes could be so... riveting? 🚀 Meanwhile, Timothy's saving the world, one fundraiser at a time. 🌍
fadeevab.com/how-to-setup-qemu

R.L. Dane :Debian: :OpenBSD: :FreeBSD: 🍵 :MiraLovesYou:rl_dane@polymaths.social
2025-03-10

Gotta say, I wish #bash had local / lexically-scoped functions, rather than having to rely on hacks like:

function widget {
    function ___widget_parse {
        ...
    }
    ...
    unset ___widget_parse
}

Something like this (which does not currently work) would be lovely:

function widget {
    local function parse {
        ...
    }
}

#ShellScript #ShellScripts #ShellScripting

Karl Voit :emacs: :orgmode:publicvoit@graz.social
2025-01-08

#Nixshell isn’t executing its Python/poetry command and doesn’t exit
discourse.nixos.org/t/nix-shel

Anyone interested in contributing to this thread?

#NixOS #Nix #poetry #shellscripts

2024-10-29

When a coworker asked you, what feels like it should be, a quick to answer questions, but it's not, roll on a side quest.
Is there a way to clear all scheduled downtime for a host quickly in Nagios? There is now
#nagios #techtips #ShellScripts #bashscript
mikedixson.com/posts/bulk-clea

Peter N. M. Hansteenpitrh
2024-09-24
Jon "The Nice Guy" SpriggsJonTheNiceGuy@toot.io
2024-09-14

I wrote a blog post: "Why (and how) I’ve started writing my #ShellScripts in #Python"
jon.sprig.gs/blog/post/8025

A photo of a conch shell in front of a blurry photo frame.
R. L. Dane :debian: :openbsd:RL_Dane@fosstodon.org
2024-07-03

Hey #AskFedi (#Linux / #UNIX / #BSD users in particular),

Does anyone have a preferred front-end to keepassxc-cli? I know there's a rofi interface shell script, but I honestly found it kind of clunky.

This is something that could be very easily and nicely shell scripted, and I wanted to ask if anyone knows of one out there already before I re-invented the wheel.

#Keepass #KeepassXC #ShellScripting #ShellScript #ShellScripts

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst