mastodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance, open to everyone, but mainly English and French speaking.

Administered by:

Server stats:

739
active users

#scripting

2 posts2 participants0 posts today

Here's a #ShellScripting puzzle. Suppose you have a shell script run with the "-e" flag, i.e., it's supposed to exit immediately if a command exits with a non-zero exit status. But there's one particular command you want to capture the exit status of so you can check if it's a particular failure code and ignore it if so. What's the cleanest way to do that?
I ended up using

set +e
command-to-check
ret=$?
set -e

This seems gross. Is there a cleaner way?
#Linux #UNIX #scripting

Replied in thread

@jamesbritt oh, neat! did you finish it or did it just become a gist? i've written, upon request, lots of section / pattern sequencer things, and also, this low-level one:

i've been so busy with EQ30 (a mutilated 4xEQ10 with Canvas) and Groovebox8120 updates that i haven't gotten around to also putting in BPM & LPB print but i really should stop just thinking about it and do it quickly since it takes zero effort, I've got all the pieces already. #renoise #paketti #lua #scripting

TIL that software (especially #scripting runtimes like #Python, #Perl, and #NodeJS) running in #Alpine #Linux containers is often slower than in other distros like #Ubuntu. This is despite Alpine being faster on startup and often vastly more efficient with CPU, memory, and storage.

It mostly comes down to Alpine’s use of musl libc rather than #GNU’s glibc. musl is optimized for minimalism, not raw performance. Also, the Alpine packages are often not compiled with as many optimizations.

Ich wollte mal schauen, wo bei mir in der Nähe Jellycat Stores sind (Jellycat stellt ganz süße Kuscheltiere her). Zum Glück gibt es auf deren Website ein Store-Finder, leider jedoch werden diese nur via Suche und Google Maps abgezeigt und sind nicht via Mausklick exportierbar.
Aber: Es gibt eine versteckte JSON-Datei mit den Standorten und die kann man dann zu eimer GPX-Datei umwandeln:

codeberg.org/api/packages/mark
codeberg.org/mark22k/jellycat-

This video was helpful in getting me started on writing my own bash script to automate the process of creating ZFS snapshots and doing backups to my home server.

[Video starts at 9:45 where the scripting begins]...

youtu.be/_4wJMUgZloQ?si=JPy19G

youtu.be- YouTubeEnjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
#ZFS#Bash#Scripting