mastodon.online is one of the many independent Mastodon servers you can use to participate in the fediverse.
A newer server operated by the Mastodon gGmbH non-profit

Server stats:

10K
active users

#scripting

7 posts7 participants0 posts today

Today I learned from the flock(1) man page (on Debian) that you can put this line at the top of a shell script to prevent more than one copy of it from ever running at a time:

[ "${FLOCKER}" != "$0" ] && exec env FLOCKER="$0" flock -en "$0" "$0" "$@" || :

This is an extremely clever hack and I don't know how I've never stumbled upon it in 38 years of writing shell scripts.
#unix #linux #scripting #shellScripting

For anyone who upgraded their non-GNOME *buntu and discovered that one of their scripts suddenly has a very out-of-place libadwaita-style Zenity dialog popping up, `yad` is in the package repository and only differs by the --info/--question/--warning/--error arguments according to their compatibility wrapper at github.com/v1cont/yad/blob/mas #linux #scripting

Yet Another Dialog. Contribute to v1cont/yad development by creating an account on GitHub.
GitHubyad/data/misc/zenity.sh at master · v1cont/yadYet Another Dialog. Contribute to v1cont/yad development by creating an account on GitHub.

💡 Idea for a debugging script 💡

This might already exist for FreeBSD, and if so.. let me know!

- 1) keeps record of OS core/default settings: loader.conf, rc.conf, sysctl.conf, devfs.rules, login.conf etc
- 2) keeps record of file checksum on those OS core files (similar to the app, tripwire)
- 3) mode which shows divergence on current state vs known-default state in configs (1) and checksums (2)
-4) mode which tracks the files and their change-sets over time, similar to a zfs snapshot but at a single file-level