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

#bash

71 posts60 participants8 posts today

A bash surprise: gnu.org/software/bash/manual/h says:

Functions are declared using this syntax:

fname () compound-command [ redirections ]

Usually curly braces are used for the compound command. Yet parentheses work too. And those go into a sub-shell. Run this and carefully inspect the output.

function fun() ( # parenthesis!
echo hallo
echo fun has $$ $BASHPID
)
fun
echo main has $$ $BASHPID

By using () in a function definition, we force it into a subshell. 😲

www.gnu.orgShell Functions (Bash Reference Manual)Shell Functions (Bash Reference Manual)

#Linux #Bash

Im eigenen Git Repository hat sich was verändert (meistens ein Update) Schau dir an was genau!

Das kurze Bash-Skript veröffentlicht das Ergebnis auf Github Gist und setzt einen Trött mit einem Link dahin ab

Das Script kann sehr einfach an eigene Repos angepasst werden.

gist.github.com/dewomser/74332

Toot  the local git diff in a specific git repository   - gitdff2toot.sh
GistToot the local git diff in a specific git repositoryToot the local git diff in a specific git repository - gitdff2toot.sh

When you want to rerun a shell command you ran some time ago, how do you usually search for it?

#linux#terminal#cli

Random useful linux CLI thing I just learnt.

If you don't want to see all that lengthy text after sshing to a machine, just do

touch ~/.hushlogin

(This command creates an empty file ".hushlogin" in your user home directory)

on the machine you are sshing to. Now there won't be any welcome messages to clutter your terminal, just a prompt.

Today I (re)learned there be three ways for `date` to number weeks;

- `%U` week number of year, with Sunday as first day of week (00..53)
- `%V` ISO week number, with Monday as first day of week (01..53)
- `%W` week number of year, with Monday as first day of week (00..53)

#bash#cli#date

This error in MX Linux KDE edition is now annoying

I cant work without ffmpeg and Im NOT going to install a programming ENV: just to build one programma

>>
$ sudo apt install ffmpeg
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
ffmpeg-doc
The following NEW packages will be installed:
ffmpeg
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 1,816 kB of archives.
After this operation, 2,437 kB of additional disk space will be used.
Get:1 deb.debian.org/debian bookworm/main amd64 ffmpeg amd64 7:5.1.6-0+deb12u1 [1,816 kB]
Fetched 1,816 kB in 2s (992 kB/s)
Selecting previously unselected package ffmpeg.
(Reading database ... 342056 files and directories currently installed.)
Preparing to unpack .../ffmpeg_7%3a5.1.6-0+deb12u1_amd64.deb ...
Unpacking ffmpeg (7:5.1.6-0+deb12u1) ...
Setting up ffmpeg (7:5.1.6-0+deb12u1) ...
Processing triggers for man-db (2.11.2-2) ...
metalloid@bugrupola:~
$ ffmpeg
ffmpeg: error while loading shared libraries: libavcodec.so.59: cannot open shared object file: No such file or directory

<<

Who knows a fix apart from compilation?

deb.debian.orgIndex of /debian

[Перевод] Лучшие практики для работы с агентным программированием от Anthropic

Claude Code — это инструмент командной строки для агентного программирования. В этой статье от Anthropic рассматриваются советы и приемы, которые доказали свою эффективность при использовании Claude Code в различных кодовых базах, языках и средах.

habr.com/ru/articles/902422/

ХабрЛучшие практики для работы с агентным программированием от AnthropicВсем привет! Меня зовут Александр, я COO в SaaS-платформе аналитики данных. Последний год активно изучаю внедрение AI-решений в кросс-функциональные процессы. Делюсь полезными материалами, которые...