digitalcourage.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Diese Instanz wird betrieben von Digitalcourage e.V. für die Allgemeinheit. Damit wir das nachhaltig tun können, erheben wir einen jährlichen Vorausbeitrag von 1€/Monat per SEPA-Lastschrifteinzug.

Server stats:

823
active users

#shell

14 posts13 participants0 posts today

Tip for Linux shell beginners: Execute a second command only if the first one failed.

`command_1 || command 2`

Background: This compound command uses the result code returned by `command_1` with the "shortcircuit" behaviour of the "logical OR" `||` operator.

🌡️ Los culpables tienen cara: las 180 #empresas más emisoras de #CO2 agravaron la virulencia de las #olasdecalor. En esta lista estarían las compañías #petroleras #Gazprom #ExxonMobil #Chevron #BP #Aramco #Shell o la española #Repsol (en el puesto 50), según un equipo de investigadores que ha hecho el ejercicio de cuantificar el impacto de estos actores en la crisis climática y que, según los expertos, abre una vía para reclamar en los tribunales
en.eldiario.es/fDRVZW

Wednesday, September 10, 2025

In first for NATO, Poland downs Russian drones amid mass attack on Ukraine as Putin tests Western resolve -- Skyranger mobile air defense systems are heading to Ukraine — here's what they can do -- Explosions put 3 Russian pipelines out of service -- Pure terrorism: Russian air strike kills 24 pensioners, postal service employees ... and more

activitypub.writeworks.uk/2025

Umm, why didn't I do this... years ago??

~ $ wc pinglog.txt 
  387290  1549160 11618700 pinglog.txt
~ $ type commaify
commaify is a function
commaify () 
{ 
    local expr='s/([0-9])([0-9]{3}\>)/\1,\2/g';
    sed -E "$expr; $expr; $expr; $expr; $expr; $expr; $expr; $expr; $expr; $expr"
}
~ $ wc pinglog.txt |commaify
  387,290  1,549,160 11,618,700 pinglog.txt
#bash#shell#UNIX