#bash
https://youtu.be/1XJbhLBy4Vk
#AI #bash #linux #gpt
le lien github vers la V3 de doctorubuntu est dans la descriptoin
Today I produced the following script, that receives as input an email containing a DMARC XML report as an attachment, extracts the attachment, decompresses it, and queries the report to see if there are failures coming from any of the IPs that I use to send mail (ignoring those I don’t use/control), and sends an error message and the decompressed file to a room on my Matrix server for any failures it finds.
#!/bin/bash
TMP=$(mktemp -d)
SOURCE_IPS=$(host mail.koehn.com | grep address | awk '{print "\""$(NF)"\","}' | tr '\n' ' ' | sed 's/, $//')
cd "$TMP" || exit 1
function cleanup {
rm -rf "$TMP"
}
trap cleanup EXIT
FILES=$(munpack -f 2>/dev/null | awk '{print $1}')
for file in $FILES ; do
if 7z e -so "$file" | xidel --data - --xquery './/row[source_ip=('"$SOURCE_IPS"') and (policy_evaluated/dkim="fail" or policy_evaluated/spf="fail")]' 2> >(grep -v "Processing: stdin") | grep . ; then
mc -m "🔴 Received DMARC report containing failures: $file"
mc -f "$file"
fi
done
I worked quite hard to solve this problem, and I’m happy with its (eventual) simplicity. When you have (for example) two Kubernetes containers in a pod (or two processes that can share a named pipe) and you need to run a process on one of them from the other one, I have just the tool for you. It’s basically ssh
without all the pesky networking, using named pipes instead of TCP streams.
Four simple steps to make Linux’s Bash prettier and more functional for non-expert users
Many remote (and even local) commands can executed so much quicker when using Bash instead of graphical user interfaces, but for newer users, Bash can be an unfriendly and cumbersome environment.
In this video I show how, with the installation of just three applications and some alias commands, we can make working with Bash much faster, easier, and prettier!
See https://youtu.be/OR2G9OSlmVI
#technology #Linux #Bash #tips #productivity
#Blog, ##bash, ##linux, ##productivity, ##technology, ##tips
I rebuilt a system for keeping electronic notes for other programs, and moved that from a flat text file to a MySql database table, fixing the script and the 2 programs that use that information.
The name, in English, is a bit like ‘rubbish’, which holds dear memories of my first job, where we had a similar system to keep pointers, last-used-dates and other unrelated stuff together.
Full Circle Magazine #184
This month: * Command & Conquer * How-To : Bash to Python, Migrating from VAX/VMS and Latex * Graphics : Inkscape * Everyday Ubuntu: Diagramming with Dia * Review : Xubuntu 22.04 * Review : Void Linux * Ubuntu Games : Crystal Caves HD plus: News, My Opinion, The Daily Waddle, Q&A, and more. Get it while it's
#magazine #bash #crystalcaves #dia #diagram #inkscape #latex #python #qa #vax #vaxvms #vms #void #voidlinux #waddle #xubuntu #fullcirclemagazine #ubuntu #linux
Pour un nul en #lignedecommande comme moi, cette #app #Android sur #FDroid me paraît super utile.
Je pense la traduire.
#Linux #Shell #Bash #CommandLine
#LinuxCommandLibrary (4638 manual pages, 21 basic categories and a bunch of general terminal tips.)
GNU Linux bash - the ultimate (LTE) modem debugging one-liner
currently wrestling with a LTE modem, that used to work under Ubuntu, but refuses to work under Debian 11.
<span style="color: #00ffff;">while true; do echo "=== show modem status:"; mmcli -m 1|grep -e model -e primary -e state -e signal; echo -e "\n=== show routing table:"; route -n; echo -e "\n=== show arp table:"; arp -an; echo -e "\n=== ping a host 3x times:"; ip -c a; ping -c3 1.1.1.1; sleep 1; clear; done</span>
# info about the system
<span style="color: #00ffff;">lsb_release -d</span>
Description: Debian GNU/Linux 11 (bullseye)
<span style="color: #00ffff;">uname -a</span>
Linux tuxedo 5.10.0-16-amd64 #1 SMP Debian 5.10.127-1 (2022-06-30) x86_64 GNU/Linux
<span style="color: #00ffff;">lsusb</span>
Bus 003 Device 005: ID 12d1:15bb Huawei Technologies Co., Ltd. ME936 LTE/HSDPA+ 4G modem
# sample output
=== show modem status:
| model: ME936
| primary port: ttyUSB0
| state: connected
| power state: on
| signal quality: 22% (recent)
=== show routing table:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 37.80.230.59 0.0.0.0 UG 700 0 0 wwx022c80139263
37.0.0.0 0.0.0.0 255.0.0.0 U 700 0 0 wwx022c80139263
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wwx022c80139263
=== show arp table:
? (37.80.230.59) at on wwx022c80139263
=== ping a host 3x times:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: wwx022c80139263: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 02:2c:80:13:92:63 brd ff:ff:ff:ff:ff:ff
inet 37.80.230.58/8 brd 37.255.255.255 scope global noprefixroute wwx022c80139263
valid_lft forever preferred_lft forever
3: wlp52s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 36:20:ec:72:3f:66 brd ff:ff:ff:ff:ff:ff permaddr 70:9c:d1:62:10:9c
5: enxa0cec851d79b: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether a0:ce:c8:51:d7:9b brd ff:ff:ff:ff:ff:ff
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
From 37.80.230.58 icmp_seq=1 Destination Host Unreachable
From 37.80.230.58 icmp_seq=2 Destination Host Unreachable
From 37.80.230.58 icmp_seq=3 Destination Host Unreachable
--- 1.1.1.1 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2046ms
#linux #gnu #gnulinux #opensource #administration #sysops #lte #modem #debugging #debug #bash
Originally posted at: https://dwaves.de/2022/07/12/gnu-linux-bash-the-ultimate-lte-modem-debugging-one-liner/
GNU Linux bash - notebook laptop test battery runtime script
how long (many hours) will this notebook-laptop battery last? some sensors/softwares report/calculate things like this... 5days on one charge is a very very optimistic estimate for most intel or amd based notebooks (even for RISC/ARM based notebooks-laptops that would be AWESOME, most[...]
#linux #gnu #gnulinux #opensource #administration #sysops #hardware #battery #test #script #bash #scripting #scripts
Originally posted at: https://dwaves.de/2022/07/08/gnu-linux-bash-notebook-laptop-test-battery-runtime-script/
gnu linux - bash console - animated ascii art - sl steam locomotive
just one of those programs, that make users smile 🙂
written in C 🙂
compile it from src
or go
<span style="color: #00ffff;">lsb_release -d</span>; # tested on
Description: Debian GNU/Linux 11 (bullseye)
<span style="color: #00ffff;">su - root</span>
<span style="color: #00ffff;">apt update</span>
<span style="color: #00ffff;">apt install sl</span>
#linux #gnu #gnulinux #opensource #administration #sysops #ascii #art #bash #locomotive
Originally posted at: https://dwaves.de/2022/06/28/gnu-linux-bash-console-animated-ascii-art-sl-steam-locomotive/
GNU Linux bash - setup and modify basics script
it is part of a scripts package straight after (Debian based) GNU Linux OS setup, usually doing those modifications: vim /scripts/install_basics.sh #!/bin/bash echo "=== install the basic tools needed to work with a system ===" echo "== disable cdrom apt repo =="[...]
#linux #gnu #gnulinux #opensource #administration #sysops #bash #gnu-linux #setup
Originally posted at: https://dwaves.de/2022/03/03/gnu-linux-bash-setup-and-modify-basics-script/
ZigzagDownLoader
New extension: DROP.download
The drop.download hosting service allows free download of high definition movies using an acceptable bandwidth.
#zdl #bash #linux #cygwin #downloader #axel #wget #aria2 #gnu #free #freesoftware #softwarelibero #zigzag #zigzagdownloader #condividetevelo #sharing #streaming #hosting #filehosting #xdcc #dcc #irc #automazione #drop.download
ZigzagDownLoader
Nuova estensione: DROP.download
Il servizio di hosting drop.download permette lo scaricamento gratuito di filmati ad alta definizione utilizzando una banda accettabile.
#zdl #bash #linux #cygwin #downloader #axel #wget #aria2 #gnu #free #freesoftware #softwarelibero #zigzag #zigzagdownloader #condividetevelo #sharing #streaming #hosting #filehosting #xdcc #dcc #irc #automazione #drop.download
ZigzagDownLoader
Update: FILECRYPT.cc
Updated the redirect service for filecrypt.cc
#zdl #bash #linux #cygwin #downloader #axel #wget #aria2 #gnu #free #freesoftware #softwarelibero #zigzag #zigzagdownloader #condividetevelo #sharing #streaming #hosting #filehosting #xdcc #dcc #irc #automazione #filecrypt
ZigzagDownLoader
Aggiornamento: FILECRYPT.cc
Aggiornato il servizio di reindirizzamento per filecrypt.cc
#zdl #bash #linux #cygwin #downloader #axel #wget #aria2 #gnu #free #freesoftware #softwarelibero #zigzag #zigzagdownloader #condividetevelo #sharing #streaming #hosting #filehosting #xdcc #dcc #irc #automazione #filecrypt