home.social

#shellscript — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #shellscript, aggregated by home.social.

fetched live
  1. 🐧💻 Ah, behold! A miraculous shell script that supposedly transforms your humble #Linux box into an all-powerful #LLM agent, streaming and mentoring like a tech-savvy #Yoda. Because who needs modern conveniences like Node or npm when you can #curl your way to enlightenment? 🌀 Just make sure you're running it on your grandma's 1995 Alpine container, because why not? 🤦‍♂️
    getclaw.site/#demo #shellscript #tech #enlightenment #HackerNews #ngated

  2. 🐧💻 Ah, behold! A miraculous shell script that supposedly transforms your humble #Linux box into an all-powerful #LLM agent, streaming and mentoring like a tech-savvy #Yoda. Because who needs modern conveniences like Node or npm when you can #curl your way to enlightenment? 🌀 Just make sure you're running it on your grandma's 1995 Alpine container, because why not? 🤦‍♂️
    getclaw.site/#demo #shellscript #tech #enlightenment #HackerNews #ngated

  3. Hacked up a new script to update multiple repositories (or just the one) non-destructively. Doesn't handle all use cases, of course, but useful for a lot of general cases. It stashes any currently uncommitted work, and updates multiple branches---which can be specified as arguments.

    github.com/sanjayankur31/100_d

  4. Just wrote a new blog post: The power of Bash and Awk, about making a real (if simple) static site generator in only 24 lines of #ShellScript nosycat.notimetoplay.org/pmwik

  5. Just wrote a new blog post: The power of Bash and Awk, about making a real (if simple) static site generator in only 24 lines of #ShellScript nosycat.notimetoplay.org/pmwik

  6. Would you like to get more out of bsddialog(3)?
    BSDCan has a tutorial for that:

    Introduction to TUI Programming using bsddialog with Benedict Reuschling
    Thursday 2026-06-18: 13:00 - 16:00

    Shell scripts have a bad reputation when it comes to usability and eye candy. Modern users find a blinking cursor on a a black screen leaves a lot to be desired when having to interact with a shell script. In this tutorial, we will create shell scripts that look like a GUI application: with buttons to press, input fields, select boxes and animated progress bars. These so called TUI (text user interfaces) programs still use shell script functionality as the backend, but are lightweight enough to not introduce too much overhead. Users will appreciate the ease of use of your shell scripts and you can rely on them to give you the data and visualizations you to need. At the same time, the TUI application is not difficult to learn and implement into existing scripts.

    More info:

    bsdcan.org/2026/timetable/time

    #unix #tui #shellscript #runbsd #bsdcan

  7. Would you like to get more out of bsddialog(3)?
    BSDCan has a tutorial for that:

    Introduction to TUI Programming using bsddialog with Benedict Reuschling
    Thursday 2026-06-18: 13:00 - 16:00

    Shell scripts have a bad reputation when it comes to usability and eye candy. Modern users find a blinking cursor on a a black screen leaves a lot to be desired when having to interact with a shell script. In this tutorial, we will create shell scripts that look like a GUI application: with buttons to press, input fields, select boxes and animated progress bars. These so called TUI (text user interfaces) programs still use shell script functionality as the backend, but are lightweight enough to not introduce too much overhead. Users will appreciate the ease of use of your shell scripts and you can rely on them to give you the data and visualizations you to need. At the same time, the TUI application is not difficult to learn and implement into existing scripts.

    More info:

    bsdcan.org/2026/timetable/time

    #unix #tui #shellscript #runbsd #bsdcan

  8. Are you looking to sharpen your Shell Scripting chops? Then you may be interested in the BSDCan Shell Scripting Tutorial for Beginners and Sysadmins with Mathias Eggers.

    Anyone who works with BSD and other Unix- and Linux-like systems will sooner or later have to deal with the shell and shell scripts, e.g. automation of repetitive task or starting services in /etc/rc.d. Understanding scripts and how to meaningfully extend or rewrite them is the goal of this tutorial, which is mainly designed for beginners and sysadmins.

    Simple shell scripts often consist of a sequence of arbitrary shell commands executed in a specific order to achieve a particular purpose. This is where the tutorial will begin, and I will then walk participants through the other components of a script using examples:

    Variables

    Sourcing

    Control structures

    Loops

    In- and output redirection

    Parameters and options

    Functions

    Testing scripts

    From the tutorial the participants will get an impression of what could be achieved with the well-equipped toolbox the shell provides and use that knowledge for creating own scripts for their projects.

    Participants should bring their own machines to try out the examples. I encourage everybody to ask questions and bring examples or problems from their daily work to the tutorial to foster a vivid discussion.

    I've been writing shell scripts as part of my work since I got in contact with Unix in 1993 and have been teaching shell programming to apprentices for over ten years. This tutorial will be a shortened and in regards to rc-scripts extended version of that one-week course.

    bsdcan.org/2026/timetable/time

    You can register for this tutorial and the BSDCan conference here:

    bsdcan.org/2026/registration.h

    If you register before May 1st, you can take advantage of the free reception on Saturday!

    #runbsd #runsh #sh #bsdcan #shellscript #Unix

  9. Are you looking to sharpen your Shell Scripting chops? Then you may be interested in the BSDCan Shell Scripting Tutorial for Beginners and Sysadmins with Mathias Eggers.

    Anyone who works with BSD and other Unix- and Linux-like systems will sooner or later have to deal with the shell and shell scripts, e.g. automation of repetitive task or starting services in /etc/rc.d. Understanding scripts and how to meaningfully extend or rewrite them is the goal of this tutorial, which is mainly designed for beginners and sysadmins.

    Simple shell scripts often consist of a sequence of arbitrary shell commands executed in a specific order to achieve a particular purpose. This is where the tutorial will begin, and I will then walk participants through the other components of a script using examples:

    Variables

    Sourcing

    Control structures

    Loops

    In- and output redirection

    Parameters and options

    Functions

    Testing scripts

    From the tutorial the participants will get an impression of what could be achieved with the well-equipped toolbox the shell provides and use that knowledge for creating own scripts for their projects.

    Participants should bring their own machines to try out the examples. I encourage everybody to ask questions and bring examples or problems from their daily work to the tutorial to foster a vivid discussion.

    I've been writing shell scripts as part of my work since I got in contact with Unix in 1993 and have been teaching shell programming to apprentices for over ten years. This tutorial will be a shortened and in regards to rc-scripts extended version of that one-week course.

    bsdcan.org/2026/timetable/time

    You can register for this tutorial and the BSDCan conference here:

    bsdcan.org/2026/registration.h

    If you register before May 1st, you can take advantage of the free reception on Saturday!

    #runbsd #runsh #sh #bsdcan #shellscript #Unix

  10. Wrote a #shell function without using ls inside of $( ), so my inner @mirabilos won't harass me. XD

    #slightly easier wireguard command
    function wg {
        local dir file profile profiledir= parm=${1:-} statustext
        #Find profile dir
        for dir in {,/usr/local}/etc/wireguard; do
            if [[ -d $dir ]]; then
                profiledir=$dir
                break
            fi
        done
        #Find config file
        if [[ -n $profiledir ]]; then
            for file in $profiledir/*.conf; do
                if [[ -e $file ]]; then
                    profile=${file//*\/}
                    profile=${profile/.conf}
                    break
                fi
            done
        fi
        [[ -n $profile ]] || profile=proton
        statustext="wireguard profile $profile"
        case ${parm,,} in
            up|on)      doas wg-quick  up  $profile;;
            down|off)   doas wg-quick down $profile;;
            status)     echo -en "$statustext _______\r"
                        echo -en "$statustext "
                        ifconfig |grep -q "^$profile:" && echo enabled || echo disabled;;
            *)          warn "wg usage: wg up|down|status";;
        esac
    }
    

    Hmm, seems ${foo,,} for lower case conversion is #bash-only. I wonder if I should use tr instead.

    #Unix #UnixShell #ShellScript #ShellScripting

  11. Wrote a #shell function without using ls inside of $( ), so my inner @mirabilos won't harass me. XD

    #slightly easier wireguard command
    function wg {
        local dir file profile profiledir= parm=${1:-} statustext
        #Find profile dir
        for dir in {,/usr/local}/etc/wireguard; do
            if [[ -d $dir ]]; then
                profiledir=$dir
                break
            fi
        done
        #Find config file
        if [[ -n $profiledir ]]; then
            for file in $profiledir/*.conf; do
                if [[ -e $file ]]; then
                    profile=${file//*\/}
                    profile=${profile/.conf}
                    break
                fi
            done
        fi
        [[ -n $profile ]] || profile=proton
        statustext="wireguard profile $profile"
        case ${parm,,} in
            up|on)      doas wg-quick  up  $profile;;
            down|off)   doas wg-quick down $profile;;
            status)     echo -en "$statustext _______\r"
                        echo -en "$statustext "
                        ifconfig |grep -q "^$profile:" && echo enabled || echo disabled;;
            *)          warn "wg usage: wg up|down|status";;
        esac
    }
    

    Hmm, seems ${foo,,} for lower case conversion is #bash-only. I wonder if I should use tr instead.

    #Unix #UnixShell #ShellScript #ShellScripting

  12. Ah, it seems my Google-foo is strong. I think I found a modified #Automator #ShellScript to not add the line feed.

  13. Ah, it seems my Google-foo is strong. I think I found a modified #Automator #ShellScript to not add the line feed.

  14. Any #Automator #ShellScript experts care to help?

    I created the following script to copy the first 6 characters of a selected filename to the clipboard. But the clipboard item ends up with a hard return after the characters. Is there a way to put a stop to that?

  15. Any #Automator #ShellScript experts care to help?

    I created the following script to copy the first 6 characters of a selected filename to the clipboard. But the clipboard item ends up with a hard return after the characters. Is there a way to put a stop to that?

  16. 🤦‍♂️ Ah yes, #Linux is an #interpreter now. Because who needs a perfectly functional kernel when you can make an OS behave like a wannabe shell script interpreter? 👻 Fear not, dear reader, the author promises you an inscrutable command that might just be #malware, but hey, that’s all part of the #fun, right? 🐔
    astrid.tech/2026/03/28/0/linux #ShellScript #HackerNews #ngated

  17. 🤦‍♂️ Ah yes, #Linux is an #interpreter now. Because who needs a perfectly functional kernel when you can make an OS behave like a wannabe shell script interpreter? 👻 Fear not, dear reader, the author promises you an inscrutable command that might just be #malware, but hey, that’s all part of the #fun, right? 🐔
    astrid.tech/2026/03/28/0/linux #ShellScript #HackerNews #ngated

  18. Mi skribis unu simpla #ShellScript por fari elŝuti de ĉiu senpaga #RaspberryPi revuoj de oficiala retejo.

    Kiuj posedas intereso en uzi ĝi, povas recevi ĝi en: github.com/A-Infor/Shell-Scrip

  19. Here's a little puzzle for you. Can you figure out the purpose of this one-off shell script I just wrote?
    If you post an answer put it behind a CW so you don't spoil it for others!
    #programming #scripting #shellScript #shellScripting #Linux

  20. Here's a little puzzle for you. Can you figure out the purpose of this one-off shell script I just wrote?
    If you post an answer put it behind a CW so you don't spoil it for others!
    #programming #scripting #shellScript #shellScripting #Linux

  21. And today's multi-hour confusing time suck was:

    `curl -H "Authorization: ${TOKEN}"`

    (Note conspicuous lack of the word `Bearer`)

    To add #insult to #injury, this old #Perl guy had to dig into some #PHP in order to figure out where his stupid #shellscript went wrong.

    On the other hand, I did gather enough #research to propose a #solution to #decommission a piece of #commercial software in favor of a mix of #cloud services and #selfhosted #opensource.

  22. And today's multi-hour confusing time suck was:

    `curl -H "Authorization: ${TOKEN}"`

    (Note conspicuous lack of the word `Bearer`)

    To add #insult to #injury, this old #Perl guy had to dig into some #PHP in order to figure out where my stupid #shellscript went wrong.

    On the other hand, I did gather enough #research to propose a #solution to #decommission a piece of #commercial software in favor of a mix of #cloud services and #selfhosted #opensource.

  23. Muita discussão interessante rolando no fidigerson e eu... há três dias tentando recuperar um arquivo. :angery:
    Provavelmente a parte de recuperar é a mais simples. O difícil é encontrar o diacho do arquivo numa montanha de arquivinhos... Fiz logo um script shell pq a quantidade tá brutal.

    #testdisk #photorec #recuperaçãodearquivos #shellscript #shell #bash

  24. Muita discussão interessante rolando no fidigerson e eu... há três dias tentando recuperar um arquivo. :angery:
    Provavelmente a parte de recuperar é a mais simples. O difícil é encontrar o diacho do arquivo numa montanha de arquivinhos... Fiz logo um script shell pq a quantidade tá brutal.

    #testdisk #photorec #recuperaçãodearquivos #shellscript #shell #bash

  25. 🚀🕰️ Ah, the #nostalgia of square brackets in shell scripting—the forgotten relics of our #coding youth! 🤓📚 Luca Ferrari takes us on a time-traveling adventure to rediscover the ancient art of 'test,' proving once again that some people will do anything to relive their university glory days. 🎓💾
    fluca1978.github.io/2025/12/10 #test #shellscript #retro #tech #HackerNews #ngated

  26. 🚀🕰️ Ah, the #nostalgia of square brackets in shell scripting—the forgotten relics of our #coding youth! 🤓📚 Luca Ferrari takes us on a time-traveling adventure to rediscover the ancient art of 'test,' proving once again that some people will do anything to relive their university glory days. 🎓💾
    fluca1978.github.io/2025/12/10 #test #shellscript #retro #tech #HackerNews #ngated

  27. Re earlier toot ... as soon as I'd finished dealing with 's PRs, I wanted to use the script to view other peoples' PRs against my code (there are only two that I've not dealt with because I'm a good boy, although one has been festering for 7 years because I'm a bad boy), and then to see all my PRs against other peoples' code that are still open. And so the script got just a teensy bit bigger.

    github.com/DrHyde/shellscripts

  28. #UNIX #oneliner #shellscript:

    clear && echo "" && date | tr -d "\n" && uptime && echo ""

    Output:

    Sat Dec 20 12:18:53 GMT Standard Time 2025 12:18:53 up 5 days, 16:03, load average: 0.00, 0.00, 0.00

    NB This #commandline #wizardry is a #busybox script running on #Windows11. Enjoy #DOScember.

  29. @[email protected]

    Hi. Ich bin zufällig über
    #NextCloudBackupRestore (https://codeberg.org/DecaTec/Nextcloud-Backup-Restore) gestolpert und habe das gleich mal getestet (Bislang nur manuell und noch nicht per #Cronjob).

    Super. Vielen Dank dafür.
    👍

    Ich hätte allerdings noch 2 Feature Requests für das
    #Skript:

    1. Rechteanpassung im Ziel:

    #
    # Check if backup dir already exists
    #
    if [ ! -d "${backupDir}" ]
    then
    mkdir -p "${backupDir}"
    #chown -R "${user}" "${backupDir}"
    #chmod 700 -R "${backupDir}"
    else
    errorecho "ERROR: The backup directory ${backupDir} already exists!"
    exit 1
    fi
    Hier musste ich die chown und chmod Befehle auskommentieren, da das auf dem sftp-Share eine Fehlermeldung über fehlende Rechte erzeugt und dann das Skript abbricht. Ohne die Rechteanpassung läuft's durch.

    2.
    Nicht den gesamten
    #Webserver für die ganze Laufzeit des #Backup stoppen, sondern nur den #vhost von #Nextcloud deaktivieren.

    Hintergrund:
    Ich (und wahrscheinlich auch andere) sichere auf ein eingebundenen
    #sftp #Share zu einem anderen Server in einem anderen Rechenzentrum. Auch wenn die Anbindung zwischen diesen deutlich dicker ist als ein Heiminternetanschluss, dauert das bei meiner NC fast eine Stunde.

    Da auf dem
    #VPS (wie wahrscheinlich bei vielen) noch mehr #Webanwendungen laufen, ist alles nicht erreichbar, wenn der Webserver komplett gestoppt wird.

    Ich kann das nur hart ins Backupskript coden. für mehr reichen meine Skriptfähigkeiten nicht:
    Statt
    #
    # Stop web server
    #
    echo "$(date +"%H:%M:%S"): Stopping web server..."
    systemctl stop "${webserverServiceName}"
    echo "Done"
    echo
    sieht das bei mir nun so aus:
    echo "$(date +"%H:%M:%S"): Disabling Nextcloud vhost ..."
    a2dissite nextcloud.conf
    echo "Done"
    echo
    echo "$(date +"%H:%M:%S"): Reloading webserver ..."
    systemctl restart "${webserverServiceName}"
    echo "Done"
    echo
    und dementspechend am Ende des Skripts statt
    #
    # Start web server
    #
    echo "$(date +"%H:%M:%S"): Starting web server..."
    systemctl start "${webserverServiceName}"
    echo "Done"
    echo
    dann
    echo "$(date +"%H:%M:%S"): Enabling Nextcloud vhost ..."
    a2ensite nextcloud.conf
    echo "Done"
    echo
    echo "$(date +"%H:%M:%S"): Restarting web server..."
    systemctl restart "${webserverServiceName}"
    echo "Done"
    echo
    Aber das mit einer Variable für den vhost abzubilden und diese in die beim setup.sh in NextcloudBackupRestore.conf zu schreiben, wäre natürlich besser und damit wieder universal nutzbar.

    Bin gespannt auf deine / eure Rückmeldung.

    #Nextcloud #Backup #Skript #Script #Shellskript #Shellscript

  30. Today was #rage and #pullrequests.

    1. Yes, #hardcoded #opaque identifiers are a little tiny bit faster in this task that runs for a couple of minutes on an irregular, on-demand basis. But maybe you should look up those monstrosities starting from their #humanfriendly equivalents which are much more descriptive.

    2. Fine, you wrote some #shellscript with #LLM. It's not very #DRY and it interfaces poorly with the #pipeline syntax. This will require #commits to a branch, not just a #review.

  31. #DevLog: jj-fzf UI improvements! 🖼️

    🗓️ New Evolog Dialog
    → Ctrl-V: Show the Evolog for a Chang ID
    → Evolog Ctrl-J: Inject historic commits

    📊 Smart Column Layout
    → Overhauled the old crammed layout
    → Dismissed justified formatting
    → Implemented optimal column layout
    → Settled on column-major key formatting
    (Works best with Alt-* and Ctrl-* lists)

    ✨ Hotkey Highlighting
    → Added highlight to key combos
    → Improved spacing in hotkey list

    github.com/tim-janik/jj-fzf

    #Jujutsu #VCS #jjfzf #BuildInPublic #100DaysOfCode #Git #CLI #DevTools #ShellScript #OpenSource #Tech

  32. #DevLog: New jj-fzf Restore, LLM-powered commit messages and Oplog Revert!

    ✨ Alt-S: Start Interactive Restore

    ⏪ Oplog Alt-V: Now Reverts Operations

    📝 Smart Merge Commit Messages
    → Ctrl-D now auto-generates merge commit messages

    🏷️ New Bookmark Untrack / Push-New

    🧠 LLM-Powered Commit Messages
    → Ctrl-S edits LLM-generated descriptions
    → Supports #LLamacpp, #Gemini, #OpenAI

    🔧 Config & Docs
    → Full LLM setup documented in man page

    github.com/tim-janik/jj-fzf

    #Jujutsu #VCS #jjfzf #AI #LLM #BuildInPublic #100DaysOfCode #Git #CLI #DevTools #ShellScript #OpenSource

  33. #DevLog: jj-fzf man lists all keys now!

    ⌨️ Full key binding docs in man page
    → All keys of jj-fzf and subcommands (oplog, bookmarks, rebase, reparent) are now documented in the manual page
    → Manual page generation auto-extracts all key bindings from the individual CLI tools

    🛠️ Better git push safety
    → Now catches and handles jj git push errors gracefully

    github.com/tim-janik/jj-fzf

    #BuildInPublic #100DaysOfCode #CLI #DevTools #Jujutsu #VCS #jjfzf #ShellScript #OpenSource

  34. #DevLog: jj-fzf: Screencasts & E2E Tests! 🔍

    🔧 Fixes & UX improvements
    → Fixed missing bookmark separators
    → New Oplog key bindings to stay on current operation

    🎥 Pushed New Screencast Demos
    → Oplog undo/redo, inject commit, restore repo (attached)
    → Bookmark/tag editing, move, delete
    → Revset editing with live reload
    → Improved screencasting: key / description popups, improved reproducibility

    🧪 E2E Screencast Tests
    → CI now runs screencasts and checks outcome
    → Asciinema screencasts are downloadable CI artifacts
    → New script render.sh to render screencasts to GIF/WebP/MP4
    → New test-screencasts target in Makefile.mk

    github.com/tim-janik/jj-fzf

    #Jujutsu #VCS #jjfzf #BuildInPublic #100DaysOfCode #Git #CLI #DevTools #OpenSource #ShellScript

  35. #DevLog: jj-fzf now got advanced filtering!

    ⌨️ Ctrl-F for mode switching
    → Toggle between fzf and revset input

    🔍 fzf 0.65.2 required
    → Updated CI and preflight checks

    📅 Extended default commit history revset
    → Show all refs + 7 ancestors of immutable_heads

    📤 Bookmark push improvements
    → New "Bookmarks & Tags" dialog
    → Ctrl-P for safe remote push with dry-run

    github.com/tim-janik/jj-fzf

    #Jujutsu #VCS #jjfzf #BuildInPublic #100DaysOfCode #Git #CLI #DevTools #ShellScript #OpenSource

  36. Re earlier toot (fosstodon.org/@DrHyde/11517952) the release was further delayed by being bastards and breaking my CI by not letting me grab their data from within workflows, so I had to work around that. So that's more crawling horrors accreted onto the 20 years old that builds it all. Yay! But we have a release! The only changes are data updates and a tweak to cope with the 's new weirdness.

    @perl

  37. #DevLog: jj-fzf improvements 🛠️

    ⚡ New jj-foreach.sh script for isolated revset modifications
    🔄 Swapping commits now follows via cursor down
    🛡️ Upgraded to jj-0.33 and updated dependency checks
    🧪 Migrated to native jj undo/redo logic

    #BuildInPublic #100DaysOfCode #Jujutsu #VCS #CLI #DevTools #ShellScript #jjfzf

  38. If a public foss repo offers a foss setup.sh command line script which, step by step, performs the installation / usage steps the repo readme lists for use at the command line to set up/use the code, what trust measures would you insist upon before downloading and before running the setup.sh script at your local command line? Is there a better way of offering an helpful automated but trustworthy than a scary .sh ?