#shellscripts — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #shellscripts, aggregated by home.social.
-
Never underestimate a developer's need to put their own little stamp on things and to make themselves smile.
I create and use a lot of shell scripts in my work. I start each script with:
echo Reticulating splines...
and end it with:
echo Your hovercraft is full of eels.
Most of these scripts will only ever be used by me, but I still do it.
-
Never underestimate a developer's need to put their own little stamp on things and to make themselves smile.
I create and use a lot of shell scripts in my work. I start each script with:
echo Reticulating splines...
and end it with:
echo Your hovercraft is full of eels.
Most of these scripts will only ever be used by me, but I still do it.
-
Never underestimate a developer's need to put their own little stamp on things and to make themselves smile.
I create and use a lot of shell scripts in my work. I start each script with:
echo Reticulating splines...
and end it with:
echo Your hovercraft is full of eels.
Most of these scripts will only ever be used by me, but I still do it.
-
Never underestimate a developer's need to put their own little stamp on things and to make themselves smile.
I create and use a lot of shell scripts in my work. I start each script with:
echo Reticulating splines...
and end it with:
echo Your hovercraft is full of eels.
Most of these scripts will only ever be used by me, but I still do it.
-
Never underestimate a developer's need to put their own little stamp on things and to make themselves smile.
I create and use a lot of shell scripts in my work. I start each script with:
echo Reticulating splines...
and end it with:
echo Your hovercraft is full of eels.
Most of these scripts will only ever be used by me, but I still do it.
-
Am I the only one that never, ever uses getopt/getops in shell scripts?
Just writing your own argument parser seems so much easier to do. :/
-
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: https://content.haacksnetworking.org/w/byjvKm4LXLLn7q4ngYaG8f
#livestream #live #gnulinux #sysadmin #floss #freesoftware #rsync #rsnapshot #shellscripts
-
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.
-
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: https://evanhahn.com/notes-from-october-2025/
-
#SolucionarioDelProgramador #GNU_linux : Parámetros línea de Comandos en #bash
#programming #programacion #cmdline #ARGV #Getopt #ShellScripts #shell
https://ibolcode.net/roor/2025-10-parametros-linea-de-comandos--bash
-
#SolucionarioDelProgramador #GNU_linux : Parámetros línea de Comandos en #bash
#programming #programacion #cmdline #ARGV #Getopt #ShellScripts #shell
https://ibolcode.net/roor/2025-10-parametros-linea-de-comandos--bash
-
#SolucionarioDelProgramador #GNU_linux : Parámetros línea de Comandos en #bash
#programming #programacion #cmdline #ARGV #Getopt #ShellScripts #shell
https://ibolcode.net/roor/2025-10-parametros-linea-de-comandos--bash
-
#SolucionarioDelProgramador #GNU_linux : Parámetros línea de Comandos en #bash
#programming #programacion #cmdline #ARGV #Getopt #ShellScripts #shell
https://ibolcode.net/roor/2025-10-parametros-linea-de-comandos--bash
-
#SolucionarioDelProgramador #GNU_linux : Parámetros línea de Comandos en #bash
#programming #programacion #cmdline #ARGV #Getopt #ShellScripts #shell
https://ibolcode.net/roor/2025-10-parametros-linea-de-comandos--bash
-
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: https://evanhahn.com/scripts-i-wrote-that-i-use-all-the-time/
-
Prevent overlapping cron jobs using `flock`
https://tech.mrleong.net/prevent-concurrent-cron-jobs-using-flock
-
In the helpful shell functions department:
(Requires
bcto 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 } -
I am so sorry if it failed to excite you! Nope, not your fault. :)
PS: Especially if you are a "Skimmer" ......
#linuxadmin #linux #tools #opensource #emacs #vim #git #zathura #firefox #nyxt #vimb #cli #commandline #shell #st #suckless #terminal #patch #solarized #gruvbox #cmus #mpv #ffmpeg #btop #shellscripts #bash
-
🚀 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 #LLM 0.26? 🍾🤖
https://simonwillison.net/2025/May/27/llm-tools/ #futureoftech #AItools #terminalinnovation #shellscripts #HackerNews #ngated -
🤖 #QEMU output on serial console with shell scripts in 2019? Groundbreaking! 🎉 Who knew stringing together #SSH, Expect, and named pipes could be so... riveting? 🚀 Meanwhile, Timothy's saving the world, one fundraiser at a time. 🌍
https://fadeevab.com/how-to-setup-qemu-output-to-console-and-automate-using-shell-script/ #ShellScripts #Fundraising #Innovation #HackerNews #ngated -
Setup QEMU Output to Serial Console and Automate Tests with Shell Scripts (2019)
https://fadeevab.com/how-to-setup-qemu-output-to-console-and-automate-using-shell-script/
#HackerNews #QEMU #Serial #Console #ShellScripts #Automation #Testing
-
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 { ... } } -
#Nixshell isn’t executing its Python/poetry command and doesn’t exit
https://discourse.nixos.org/t/nix-shell-isnt-executing-its-python-poetry-command-and-doesnt-exit/58452Anyone interested in contributing to this thread?
-
OpenBSD now enforcing no invalid NUL characters in shell scripts https://www.undeadly.org/cgi?action=article;sid=20240924105732 #openbsd #shells #shellscripts #ksh #development #nul #nulchar #nulbyte #invalidchar
-
OpenBSD now enforcing no invalid NUL characters in shell scripts https://www.undeadly.org/cgi?action=article;sid=20240924105732 #openbsd #shells #shellscripts #ksh #development #nul #nulchar #nulbyte #invalidchar
-
OpenBSD now enforcing no invalid NUL characters in shell scripts https://www.undeadly.org/cgi?action=article;sid=20240924105732 #openbsd #shells #shellscripts #ksh #development #nul #nulchar #nulbyte #invalidchar
-
OpenBSD now enforcing no invalid NUL characters in shell scripts https://www.undeadly.org/cgi?action=article;sid=20240924105732 #openbsd #shells #shellscripts #ksh #development #nul #nulchar #nulbyte #invalidchar
-
OpenBSD now enforcing no invalid NUL characters in shell scripts https://www.undeadly.org/cgi?action=article;sid=20240924105732 #openbsd #shells #shellscripts #ksh #development #nul #nulchar #nulbyte #invalidchar
-
I wrote a blog post: "Why (and how) I’ve started writing my #ShellScripts in #Python"
https://jon.sprig.gs/blog/post/8025 -
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
-
for like more than 30 years, i have kinda skirted writing serious #ShellScripts, getting good with #awk and #sed , and getting really good with #LaTeX because it usually meant a TON of digging through old documentation and piecing things together. Recently, i just started asking #chatgpt things like:
How do I flip through a directory of a bazillion zip files, uncompress each one, put the contents on my NAS, and then move those zip files somewhere else for safekeeping?
and learn from the answer
-
A nice explanation for something that always mystifies #Unix #Shell beginners, especially those using #Bash:
"test, [, and [[" [2020], Julio Merino (https://jmmv.dev/2020/03/test-bracket.html).
-
Do you use #macOS devices in your company? And how do you manage them? One of the most widely used macOS management tools is probably #Jamf. But did you know you can also manage macOS with #Intune?
The best support in Intune is, of course, #Windows. And it's true that Intune's MacOS support is not as good as, for example, Jamf. But you need to consider whether the added functionality in Jamf is even needed and if so, whether it's really worth the investment of buying another #MDM solution that also won't integrate with other Microsoft 365 products.
If you choose to manage macOS devices from Intune, there are three options for applying policies to the device.
Native configuration profiles. At a minimum, you can make basic settings using configuration profiles that you simply create directly from within Intune, similar to Windows configuration profiles. There are already a large number of natively supported configurations that you simply create directly from the portal. And more will be added as time goes on.
Mobileconfigs are XML configuration files. If you want to configure something that is not directly available from the configuration profiles, you can use mobileconfig. However, because these are XML files, it can be quite a chore to create such XML manually. However, there are tools that will generate the configuration XML for you, such as iMazing.
Shell scripts are the final third option, which is the equivalent of #PowerShell on Windows. Shell scripts allow you to create configurations using shell commands. #devicemanagement #tips #macos #intune #mobileconfig #shellscripts #cybersecurity
-
@jgsjames @sashag oh yes! 10 line awk scripts can do the work of fancy ETL tools that cost thousands. Why have shell scripts fallen out of favor? #ShellScripts
-
ADHD + debugging a shell script = “what else do I have to do?”
-
I did a search for ‘debug bash script’ and all I got back were a series of link to pray lines and a Swiss euthanasia clinic.
-
#security #shellScripts #StupidIdeas I see a lot of newer "installers" for various projects like Rust, Homebrew, Oh-my-zsh, and more, asking people simply run a shell script from the internet. And I'm not thrilled with this; I know packages have issues too. However, a shell script seems like a prime target for malware. Can we please return to more sensible installers? PLEASE? Are we just going to default to the most insecure way of delivering software? When did this become "Normal"...
-
Many #Microsoft #Windows users often find themselves:
- Frustrated by awkward, confusing, repetitive, or time-consuming workflows.
- Disappointed with the user interface and its limited customization options.
- Wishing they could just install #MacOS or #Linux on their machine, but can't because of hardware or policy constraints.There are thousands of custom apps, #ShellScripts, #RegistryHacks, and other tweaks out there which we can use to make Windows more intuitive, faster, easier on the eyes, and tailor it precisely to our individual whims.
But part of the problem is that there are so many options! How do we know which ones to use? Which ones are safe to install? Stable? Actively maintained? Supported by a thriving user community? 🤯 Welcome to #AnalysisParalysis; Having too many options is roughly equivalent to having no options at all.
Fortunately, #LinusTechTips has a video that covers 95% of the mods I recommend to every Windows user. Check it out:
https://youtu.be/4GASGO0go5I -
How To Parse CSV Files In Bash Scripts In Linux #ParseCSV CSVParsing #CSV #CommaSeparatedValues #BashScripting #ShellScripts #Scripting #Linux #Unix #BashTutorial #LearnShellScripting #Awk #Sed #LinuxCommands
https://ostechnix.com/parse-csv-files-in-bash-scripts/ -
How To Parse CSV Files In Bash Scripts In Linux #ParseCSV CSVParsing #CSV #CommaSeparatedValues #BashScripting #ShellScripts #Scripting #Linux #Unix #BashTutorial #LearnShellScripting #Awk #Sed #LinuxCommands
https://ostechnix.com/parse-csv-files-in-bash-scripts/ -
You know how when you do...
``` sh
my_cmd file_to_read > file_to_read
```...then the redirect to write to the file truncates the file you're reading before you read from it?
Yeah, so do I. I learned that years ago.
I also refamiliarised myself with it today... 🤦
"Why is the file I'm reading from empty??" :t_blink:
When I write fragments of shell scripts in a Dockerfile or a GitHub Action my brain stops working :blobcatgoogly:
-
Conditional Statements In Bash Explained With Examples #ConditionalStatements #BashScripting #ShellScripting #ShellScripts #bash
https://ostechnix.com/bash-conditional-statements/ -
Do you use #macOS devices in your company? And how do you manage them? One of the most widely used macOS management tools is probably #Jamf. But did you know you can also manage macOS with #Intune?
The best support in Intune is, of course, #Windows. And it's true that Intune's MacOS support is not as good as, for example, Jamf. But you need to consider whether the added functionality in Jamf is even needed and if so, whether it's really worth the investment of buying another #MDM solution that also won't integrate with other Microsoft 365 products.
If you choose to manage macOS devices from Intune, there are three options for applying policies to the device.
Native configuration profiles. At a minimum, you can make basic settings using configuration profiles that you simply create directly from within Intune, similar to Windows configuration profiles. There are already a large number of natively supported configurations that you simply create directly from the portal. And more will be added as time goes on.
Mobileconfigs are XML configuration files. If you want to configure something that is not directly available from the configuration profiles, you can use mobileconfig. However, because these are XML files, it can be quite a chore to create such XML manually. However, there are tools that will generate the configuration XML for you, such as iMazing.
Shell scripts are the final third option, which is the equivalent of #PowerShell on Windows. Shell scripts allow you to create configurations using shell commands. #devicemanagement #tips #macos #intune #mobileconfig #shellscripts #cybersecurity
-
Do you use #macOS devices in your company? And how do you manage them? One of the most widely used macOS management tools is probably #Jamf. But did you know you can also manage macOS with #Intune?
The best support in Intune is, of course, #Windows. And it's true that Intune's MacOS support is not as good as, for example, Jamf. But you need to consider whether the added functionality in Jamf is even needed and if so, whether it's really worth the investment of buying another #MDM solution that also won't integrate with other Microsoft 365 products.
If you choose to manage macOS devices from Intune, there are three options for applying policies to the device.
Native configuration profiles. At a minimum, you can make basic settings using configuration profiles that you simply create directly from within Intune, similar to Windows configuration profiles. There are already a large number of natively supported configurations that you simply create directly from the portal. And more will be added as time goes on.
Mobileconfigs are XML configuration files. If you want to configure something that is not directly available from the configuration profiles, you can use mobileconfig. However, because these are XML files, it can be quite a chore to create such XML manually. However, there are tools that will generate the configuration XML for you, such as iMazing.
Shell scripts are the final third option, which is the equivalent of #PowerShell on Windows. Shell scripts allow you to create configurations using shell commands. #devicemanagement #tips #macos #intune #mobileconfig #shellscripts #cybersecurity
-
Do you use #macOS devices in your company? And how do you manage them? One of the most widely used macOS management tools is probably #Jamf. But did you know you can also manage macOS with #Intune?
The best support in Intune is, of course, #Windows. And it's true that Intune's MacOS support is not as good as, for example, Jamf. But you need to consider whether the added functionality in Jamf is even needed and if so, whether it's really worth the investment of buying another #MDM solution that also won't integrate with other Microsoft 365 products.
If you choose to manage macOS devices from Intune, there are three options for applying policies to the device.
Native configuration profiles. At a minimum, you can make basic settings using configuration profiles that you simply create directly from within Intune, similar to Windows configuration profiles. There are already a large number of natively supported configurations that you simply create directly from the portal. And more will be added as time goes on.
Mobileconfigs are XML configuration files. If you want to configure something that is not directly available from the configuration profiles, you can use mobileconfig. However, because these are XML files, it can be quite a chore to create such XML manually. However, there are tools that will generate the configuration XML for you, such as iMazing.
Shell scripts are the final third option, which is the equivalent of #PowerShell on Windows. Shell scripts allow you to create configurations using shell commands. #devicemanagement #tips #macos #intune #mobileconfig #shellscripts #cybersecurity
-
Do you use #macOS devices in your company? And how do you manage them? One of the most widely used macOS management tools is probably #Jamf. But did you know you can also manage macOS with #Intune?
The best support in Intune is, of course, #Windows. And it's true that Intune's MacOS support is not as good as, for example, Jamf. But you need to consider whether the added functionality in Jamf is even needed and if so, whether it's really worth the investment of buying another #MDM solution that also won't integrate with other Microsoft 365 products.
If you choose to manage macOS devices from Intune, there are three options for applying policies to the device.
Native configuration profiles. At a minimum, you can make basic settings using configuration profiles that you simply create directly from within Intune, similar to Windows configuration profiles. There are already a large number of natively supported configurations that you simply create directly from the portal. And more will be added as time goes on.
Mobileconfigs are XML configuration files. If you want to configure something that is not directly available from the configuration profiles, you can use mobileconfig. However, because these are XML files, it can be quite a chore to create such XML manually. However, there are tools that will generate the configuration XML for you, such as iMazing.
Shell scripts are the final third option, which is the equivalent of #PowerShell on Windows. Shell scripts allow you to create configurations using shell commands. #devicemanagement #tips #macos #intune #mobileconfig #shellscripts #cybersecurity
-
You know how when you do...
``` sh
my_cmd file_to_read > file_to_read
```...then the redirect to write to the file truncates the file you're reading before you read from it?
Yeah, so do I. I learned that years ago.
I also refamiliarised myself with it today... 🤦
"Why is the file I'm reading from empty??" :t_blink:
When I write fragments of shell scripts in a Dockerfile or a GitHub Action my brain stops working :blobcatgoogly:
-
You know how when you do...
``` sh
my_cmd file_to_read > file_to_read
```...then the redirect to write to the file truncates the file you're reading before you read from it?
Yeah, so do I. I learned that years ago.
I also refamiliarised myself with it today... 🤦
"Why is the file I'm reading from empty??" :t_blink:
When I write fragments of shell scripts in a Dockerfile or a GitHub Action my brain stops working :blobcatgoogly:
-
You know how when you do...
``` sh
my_cmd file_to_read > file_to_read
```...then the redirect to write to the file truncates the file you're reading before you read from it?
Yeah, so do I. I learned that years ago.
I also refamiliarised myself with it today... 🤦
"Why is the file I'm reading from empty??" :t_blink:
When I write fragments of shell scripts in a Dockerfile or a GitHub Action my brain stops working :blobcatgoogly: