This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Addiert,Subtrahiert oder Multipliziert GANZE Zahlen. | |
# Beispiel: 17+4 [ENTER] | |
read -p "Zahl1[+-*]Zahl2: " z1 a z2;echo "$z1$a$z2=$((z1$az2))" | |
# | |
#oder | |
# | |
# Addiert,subtrahiert,multipliziert oder dividiert RATIONALE Zahlen. | |
# Je nach Einstellung der Bashumgebung für Dezimalzahlen ist das Komma ein Punkt | |
# Beispiel: 17.1+3.9 [ENTER] | |
read -r -p "Zahl1[+-*/^]Zahl2: " z1 a z2;echo "$z1$a$z2= $(echo "$z1$a$z2" | bc -l)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
u=$(curl -X 'GET' \ | |
'https://wetter.hs-worms.de/api/v3/data' \ | |
-H 'accept: application/json') | |
temperatur=$(echo $u|jq ".temperature.out") | |
vorhersage=$(echo $u|jq '.forecast.rule') | |
barometer=$(echo $u|jq '.baro') | |
regenrate=$(echo $u|jq '.rain.rate') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Total toots: 200 (excluding replies & boosts) | |
Ratio toots/replies: 6.45 | |
Likes per toot: 0.48 (total likes: 96) | |
Boosts per toot: 0.26 (total boosts: 51) | |
Replies per toot: 0.31 (total replies: 62) | |
┌─────────────────────────────┬──────────────┐ | |
│ USERS YOU MENTIONED MOST │ INTERACTIONS │ | |
├─────────────────────────────┼──────────────┤ | |
│ doppeldau │ 5 │ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2K | |
Searching toots for linux 1 of 3563 [#>---------------------------] 0.03% | |
Found toot: @Lioh Ich glaube nicht,dass der Kollege Linux lerrnen will.. Hauptsache der Computer funktioniert wieder. Ich hab ihm ein Debian auf den Stick kopiert und ihm den Tipp gegeben im "BIOS" alles abzuschalten mit "safe" und "secure" bevor er mit der Installation beginnt. Er will selbst machen. Könnte klappen 😃 | |
Date: 13 Apr 24 05:29 UTC | |
URL: https://social.tchncs.de/@dewomser/112262260850854448 | |
Found toot: Eieiei Linuxkernel. schon wieder https://www.heise.de/news/Linux-Kernel-Neuer-Exploit-verschafft-Root-Privilegien-9682586.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pegelstand als csv für Grafik (1-liner) | |
wetterdienst values --provider=wsv --network=pegel --si-units=True --station=23900200 --parameter=water_level,WsvPegelDataset --resolution=dynamic --debug --tidy --format=csv > pegel.csv | |
# Pegelstand Echtzeit als Text (1-liner) | |
datum=$(date '+%d.%m.%Y');pegel=$curl "https://pegelonline.wsv.de/webservices/files/Wasserstand+Rohdaten/RHEIN/WORMS/$datum/down.txt" 2>&1 | grep "^[0-2][0-9]:[0-5][0-9]#[0-9]" | tail -1 | cut -c 7- | tr -d '\r' ; echo Pegel in Worms: "$pegel" cm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Spielerei mit array | |
readarray -t lines < /etc/passwd oder lines=( $(</etc/passwd) ) | |
#Das erste Zeile | |
echo ${lines[0]} | |
#das ganze Array in einer Zeile | |
echo ${lines[@]} | |
#Zeile root wenn vorhanden | |
echo ${lines[@]} | grep -Eow root[[:punct:][:alnum:]]*[[:space:][:alnum:]]*[[:punct:][:alnum:]]* | |
#oder alle Zeilen | |
for i in "${lines[@]}" ; do echo "$i" ; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Was was ist an meinem Geburtstag sonst noch passiert ? | |
Ein Einzeiler 😃 | |
(calender muss installiert sein) | |
echo "Was war eigentlich am:"; read -p "Tag (2-stellig): " tag; read -p "Monat (2-stellig): " monat;calendar -A 0 -t $monat$tag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Git zwingt zum Commit. | |
Wenn man gerade gar keine Ahnung hat wie man seine Zeit totschlagen soll … Hier kommt Autocommit ein 1-Liner. | |
---- | |
echo "Autocommit" >> README.md && git add "README.md" && git commit -m "$(w3m -dump https://whatthecommit.com | head -n 1)" | |
---- | |
Vorsicht ! README.md wird tatsächlich geändert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#/usr/bin/shellcheck "${0##*/}" | |
#/var/lib/snapd/snap/bin/shellcheck "${0##*/}" | |
echo -e '\e[38mG\e[m' '\e[31mo\e[m' '\e[33mo\e[m' '\e[38mg\e[m' '\e[32ml\e[m' '\e[31me\e[m' | |
if [[ -z $1 ]] ; then | |
eingabe="read -p Suche: query" | |
else | |
query="$1" | |
eingabe=$(query=\"$query\") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mit http | |
# funktioniert sofort. | |
query="linux%20worms";lynx -dump -cookies="" --display_charset=utf-8 "http://google.com/search?q=$(echo $query | sed 's/ /+/g')"|grep '^[[:blank:]][[:blank:]].[[:digit:]][[:punct:]]'| grep http://www.google.com/url\?q=http | sed -e 's/http:\/\/www.google.com\/url?q=//g' |sed -e 's/&sa=.*$//g'|grep -v google | cut -c5- | sed -rn "=;p;"| sed -r "N;s/\n//" | sed -e "s/\<\([0-9]\{1,2\}\)\>/0000\1/; s/\<0*\([0-9]\{2\}\)\>/\1/" |sed -e "s/^/ /g"| sed -e "s/\./;/1" > googlequery.csv | |
# mit https und cookies. | |
# Damit die Zeile funktioniert: | |
# zuerst "lynx-cookies -accept_all_cookies https://www.google.com" | |
# dann das Zeugs bestätigen damit alle Cookies persistent gesetzt sind | |
# danach funktioniert diese Zeile solange die Cookies nicht gelöscht werden. |
NewerOlder