#sed

secsolutionsecsolution
2025-05-05

SED, si avvicina l’appuntamento con "Il cantiere del futuro": Si avvicina l’appuntamento con SED, la tre giorni fieristica dedicata a edilizia, costruzioni e impianti che si svolgera’ dal 22 al 24 maggio presso l’A1Expo’...
dlvr.it/TKYb29

mutant ﴾! offiziell !﴿ ⸙0xD@chaos.social
2025-05-02

TIL that
1)
sed modifies binary files as if they were text.
2) Some webp images contain strings that could be mistaken for pieces of MediaWiki syntax.

On a totally unrelated note, a bunch of images in Pandora's Tale Wiki were corrupted. They should be fixed now.

#Sed #PandorasTaleWiki #Git #MediaWiki

2025-05-01

Maybe one in 5 times I use #sed I forget to single quote the input like `| sed "$d"` and wonder why it doesn't work.

Null might be the billion dollar mistake but character escaping in bash/templates/languages has got to be up there too

DER SPIEGEL | inoffiziellderspiegel_de@anonsys.net
2025-04-30
Wer George Orwells Dystopie vom perfekten Polizeistaat in der DDR las, landete im Gefängnis. Doch kurz vor dem Untergang des Regimes kam es zu einer überraschenden Wende: Fast wäre »1984« doch noch im Honecker-Staat erschienen.#GeorgeOrwell #DDR #FluchtausderDDR #SED #Bye-byeDDR-GeschichtenzumMauerfall #Überwachung
Orwells »1984«: Das Buch, das in der DDR nicht sein durfte
2025-04-30

Empty matches in Python’s `re` module

blog.narf.ssji.net/2025/04/30/

Python’s `re.sub` method has a weird, though documented, behaviour.

Replacements for empty-matching patterns such as `/.*/` applied to a non-empty string will lead to two matches. The replacement will therefore be applied twice.

A simple fix is to make sure the pattern is not empty-matching, e.g. `/.+/`.

#debugging #Python #regexps #sed

2025-04-29

Die Diskussion über als Alternative zum ist spannend und erhellend. Was mir nur absolut nicht einleuchtet, ist, warum die zweitgrößte Fraktion außen vor bleiben soll. Wenn das Modell Konkordanzdemokratie Potenzial hat, dann doch gerade dadurch, dass die AfD zeigen muss, ob sie mitregieren kann. – So hätte man übrigens schon vor 30 Jahren die ad absurdum führen können bzw. müssen.

Kevin Karhan :verified:kkarhan@infosec.space
2025-04-28

@DS_Stiftung wie sehr #Überwachung.die #Gesellschaft verändert kann mensch an #Russland seit Begin des #Putinismus sehen und davor an der #Sowjetunion und dem #NS- sowie #SED-Regimen…

  • Warum sollte es diesmal anders sein?
Doc Edward Morbius ⭕​dredmorbius@toot.cat
2025-04-28

Apropos an ongoing project, looking at sed, and realising:

  • It can execute external commands (e)
  • It can read in entire files at a given address within the input stream (r).
  • It can read in specified external files on a line-by-line basis at a specified address within the input stream (R).

I've only been using sed for, oh, 40 years.

gnu.org/software/sed/manual/se

#sed #ShellTools #linux #unix #til #shellScripting

2025-04-26
Reprise de la phase d’écriture, à laquelle se mêlent quelques recherches d’illustrations : je ne sais jamais si ce sont les mots ou les dessins qui débutent une histoire ; très rapidement les deux s’entrecroisent, s’enrichissent.
Et face à l’épuisement du petit chef d’orchestre dans ma tête qui tente de cadrer un peu tout ça, mon corps a toujours des solutions, comme des subluxations à répétition du pouce, ou l’impossibilité de tenir un pinceau sans le lâcher inopportunément (la « chance » d’avoir un SED, c’est que c’est extrêmement fluctuant, m’obligeant à alterner les activités et m’imposant de ralentir. C’est juste mon cerveau en constante imagination qui ronchonne parfois parce qu’il aimerait tellement que cela aille plus vite…)
- Lapin cherche les étoiles, tous droits réservés Plume de Souris 2025
#aquarelle #monochrome #etudemonochrome #illustrationjeunesse #litteraturejeunesse #artethandicap #sed #ehlersdanlos #elogedelalenteur
Étude à l’aquarelle en monochrome dans les tons de gris de Payne, pour l’illustration d’un texte de littérature jeunesse. Lapin est assis dans les herbes devant la pleine lune. De la branche qui le surplombe, descend une feuille en forme de cœur. -Lapin cherche les étoiles, tous droits réservés, Plume de souris 2025
2025-04-25

The poor person’s `ps`

blog.narf.ssji.net/2025/04/25/

How to list running processes without `ps`? On a Linux system, you can do this:

`for p in /proc/[0-9]* ; do echo “${p} $(cat $p/cmdline | sed ‘s/\x0/ /g’)”; done`

#Linux #sed #shell

Screenshot of a terminal showing how `for p in /proc/[0-9]* ; do echo "${p} $(cat $p/cmdline | sed 's/\x0/ /g')"; done` does a passable job at listing the processes currently running on the system.
secsolutionsecsolution
2025-04-24

SED 2025: il punto di incontro per i professionisti dell’edilizia: Manca circa un mese all’appuntamento con SED 2025 - Il salone dell’edilizia, in programma a Caserta dal 22 al 24 maggio prossimo. Evento tra i piu’ rilevanti a livello...
dlvr.it/TKL3cJ

Hello!

I am pleased to announce a new version of my "CLI text processing with GNU sed" ebook. Includes 100+ examples and exercises. Regular expressions are also discussed in detail.

Links:

* Online version: learnbyexample.github.io/learn
* Interactive TUI app for exercises: github.com/learnbyexample/TUI-

I would highly appreciate it if you’d let me know how you felt about this book. Happy learning :)

#linux #sed #ebook

Cover image for my GNU sed ebook.
EshaHaberEshahaber
2025-04-17

7 bin 94 TL hesaba yatacak! Bakanlık tarih verdi: Aile ve Sosyal Hizmetler Bakanı Mahinur Özdemir Göktaş, dar gelirli ve ihtiyaç sahibi aileler için destek müjdesini duyurdu.

22 Nisan 2025 tarihinden itibaren 1 milyar 231 milyon TL değerindeki Sosyal ve Ekonomik Destek (SED) ödemelerinin hesaplara aktarılacağını belirtti.

SED ÖDEMELERİ NEDİR?

SED ödemeleri, her ay düzenli olarak dar… eshahaber.com.tr/haber/7-bin-9 EshaHaber.com.tr

2025-04-16
playing around with #BSSG. It is much more mature than I expected and amazed me about what bare #Bash scripts are capable of. I am really considering migrate! But I am seeing an error with scripts/edit.sh:

sed: can't read s/^lastmod:.*/lastmod: 2025-04-15 21:21:19 -0500/: No such file or directory
Seems like #BSSG requires #BSD flavored #sed ? I am using #Debian so #GNU flavored #sed (GNU sed) 4.9
2025-04-11

Wrote this sed command to turn a newline-separated list into a comma-separated list surrounded by square brackets, ignoring whitespace-only lines.0

`sed -n '/^\\s*$/d;1x;H;x;s/^\\n//;s/\\([^^]\\)\\n/\\1, /;x;${x;s/\\(.*\\)/\\[\\1\\]/;p}'`

But this is very inefficient for long lists, presumably because of a constant copying to and fro between hold space and pattern space of an ever increasing accumulated string. I'm using awk now, but is there a better solution with #sed?

2025-04-08

Today I made some adjustments to my calculation function for bash:

```
┌ sebastian@suse:0 ~/.bashrc.d] ✔ (master)
└ $ sed '/= ()/,/^$/!d' calc
function = () {
rechnung=$(printf "%s" "$@")
echo "scale=${2:-2} ; ${rechnung}" | \
sed -E -e '{s/,/./g; s/·/*/g' -e "s/^|$/\'/g}" | \
xargs -I{} echo {} | bc | sed -r 's/\./,/g;:loop;s|\b([0-9]+)([0-9]{3})\b|\1.\2|g;t loop'
}

┌ sebastian@suse:0 ~/.bashrc.d] ✔ (master)
└ $ = 23,4·43,54
1.018,83
```

#linux #cli #bash #bc #sed

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst