sigmoid.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A social space for people researching, working with, or just interested in AI!

Server stats:

575
active users

#shellscripts

0 posts0 participants0 posts today
Hongster<p>Prevent overlapping cron jobs using `flock`</p><p><a href="https://tech.mrleong.net/prevent-concurrent-cron-jobs-using-flock" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">tech.mrleong.net/prevent-concu</span><span class="invisible">rrent-cron-jobs-using-flock</span></a></p><p><a href="https://fosstodon.org/tags/cli" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>cli</span></a> <a href="https://fosstodon.org/tags/ShellScripts" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ShellScripts</span></a> <a href="https://fosstodon.org/tags/command" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>command</span></a> <a href="https://fosstodon.org/tags/linux" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>linux</span></a> <a href="https://fosstodon.org/tags/cronjob" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>cronjob</span></a></p>
R.L. Dane :Debian: :OpenBSD: 🍵 :MiraLovesYou:<p>In the helpful shell functions department:</p><p>(Requires <code>bc</code> to be installed)</p><pre><code>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 } </code></pre><p><a href="https://polymaths.social/tags/shellscripting" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ShellScripting</span></a> <a href="https://polymaths.social/tags/unixshell" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>UnixShell</span></a> <a href="https://polymaths.social/tags/shellscripts" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ShellScripts</span></a> <a href="https://polymaths.social/tags/bash" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>bash</span></a> <a href="https://polymaths.social/tags/ksh" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ksh</span></a> <a href="https://polymaths.social/tags/sh" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>sh</span></a></p>
Benjamin<p>I have pushed two example bash scripts to <a href="https://codeberg.org/blindcoder/ShareTheBasics/src/branch/main/Shellscripts" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">codeberg.org/blindcoder/ShareT</span><span class="invisible">heBasics/src/branch/main/Shellscripts</span></a><br>One is a template bash script that I use for most of my scripts.<br>The other is how I use file locking in shellscripts, works across multiple hosts access the same filesystem.</p><p><a href="https://toot.berlin/tags/ShareTheBasics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ShareTheBasics</span></a> <a href="https://toot.berlin/tags/bash" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>bash</span></a> <a href="https://toot.berlin/tags/shellscripts" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>shellscripts</span></a></p>
Karl Voit :emacs: :orgmode:<p><a href="https://graz.social/tags/Nixshell" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Nixshell</span></a> isn’t executing its Python/poetry command and doesn’t exit<br><a href="https://discourse.nixos.org/t/nix-shell-isnt-executing-its-python-poetry-command-and-doesnt-exit/58452" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">discourse.nixos.org/t/nix-shel</span><span class="invisible">l-isnt-executing-its-python-poetry-command-and-doesnt-exit/58452</span></a></p><p>Anyone interested in contributing to this thread?</p><p><a href="https://graz.social/tags/NixOS" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NixOS</span></a> <a href="https://graz.social/tags/Nix" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Nix</span></a> <a href="https://graz.social/tags/poetry" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>poetry</span></a> <a href="https://graz.social/tags/shellscripts" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>shellscripts</span></a></p>
Peter N. M. Hansteen<p>OpenBSD now enforcing no invalid NUL characters in shell scripts <a href="https://www.undeadly.org/cgi?action=article;sid=20240924105732" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">undeadly.org/cgi?action=articl</span><span class="invisible">e;sid=20240924105732</span></a> <a href="https://mastodon.social/tags/openbsd" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>openbsd</span></a> <a href="https://mastodon.social/tags/shells" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>shells</span></a> <a href="https://mastodon.social/tags/shellscripts" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>shellscripts</span></a> <a href="https://mastodon.social/tags/ksh" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ksh</span></a> <a href="https://mastodon.social/tags/development" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>development</span></a> <a href="https://mastodon.social/tags/nul" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>nul</span></a> <a href="https://mastodon.social/tags/nulchar" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>nulchar</span></a> <a href="https://mastodon.social/tags/nulbyte" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>nulbyte</span></a> <a href="https://mastodon.social/tags/invalidchar" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>invalidchar</span></a></p>
Jon "The Nice Guy" Spriggs<p>I wrote a blog post: "Why (and how) I’ve started writing my <a href="https://toot.io/tags/ShellScripts" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ShellScripts</span></a> in <a href="https://toot.io/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a>"<br><a href="https://jon.sprig.gs/blog/post/8025" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">jon.sprig.gs/blog/post/8025</span><span class="invisible"></span></a></p>
R. L. Dane :debian: :openbsd:<p>Hey <a href="https://fosstodon.org/tags/AskFedi" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>AskFedi</span></a> (<a href="https://fosstodon.org/tags/Linux" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Linux</span></a> / <a href="https://fosstodon.org/tags/UNIX" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>UNIX</span></a> / <a href="https://fosstodon.org/tags/BSD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>BSD</span></a> users in particular),</p><p>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.</p><p>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.</p><p><a href="https://fosstodon.org/tags/Keepass" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Keepass</span></a> <a href="https://fosstodon.org/tags/KeepassXC" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>KeepassXC</span></a> <a href="https://fosstodon.org/tags/ShellScripting" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ShellScripting</span></a> <a href="https://fosstodon.org/tags/ShellScript" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ShellScript</span></a> <a href="https://fosstodon.org/tags/ShellScripts" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ShellScripts</span></a></p>
sergio_101<p>for like more than 30 years, i have kinda skirted writing serious <a href="https://mastodon.social/tags/ShellScripts" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ShellScripts</span></a>, getting good with <a href="https://mastodon.social/tags/awk" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>awk</span></a> and <a href="https://mastodon.social/tags/sed" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>sed</span></a> , and getting really good with <a href="https://mastodon.social/tags/LaTeX" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>LaTeX</span></a> because it usually meant a TON of digging through old documentation and piecing things together. Recently, i just started asking <a href="https://mastodon.social/tags/chatgpt" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>chatgpt</span></a> things like:</p><p>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?</p><p>and learn from the answer</p>