36 Commits
Author SHA1 Message Date
raspithek e265d95dd9 Versuche 2025-11-23 14:10:28 +01:00
raspithek 0939c771f3 Readme.md aktualisiert. 2025-11-21 11:22:28 +01:00
olli 815a66d808 Verzeichnis umbenannt. 2025-09-15 10:27:37 +02:00
olli f7336ae3e6 Merge branch 'develop' 2025-09-15 10:24:16 +02:00
olli e2346fa32f Aufgeräumt. 2025-09-15 09:50:35 +02:00
olli ff7035cd22 power.sh für mehrdimensionale Arrays. 2025-09-15 09:37:35 +02:00
olli 4bd2566b04 declare ausgelagert. 2025-09-08 09:33:48 +02:00
olli 0d67903acf array Demos 2025-09-07 14:15:56 +02:00
olli 96f5040dfe append.sh und remove.sh 2025-09-07 11:35:12 +02:00
olli a48e6bc452 Migrationsscript für /boot/firmware erster Aufschlag. 2025-07-09 17:54:50 +02:00
olli e64461d64c family_case.sh 2025-06-30 12:56:18 +02:00
olli dde357c695 Typo 2025-06-19 06:49:21 +02:00
olli c750cb4c69 Klammernotation beim Parameter. 2025-06-19 06:48:16 +02:00
olli 1af089d106 Verzeichnisse in die korrekte Reihenfolge umbenannt. 2025-06-19 06:24:38 +02:00
olli dcaafa8604 Umbenennung. 2025-06-19 05:59:08 +02:00
raspithek c3f9740332 „teil24/familyif.sh“ hinzufügen
Version mit if
2025-06-17 05:16:31 +00:00
olli 81a7c96f7f teil22 2025-06-16 13:02:22 +02:00
olli 89557b8e36 Revert "„teil23/parseargs.sh“ ändern"
This reverts commit fb7c410e8a.
2025-05-17 12:09:46 +02:00
raspithek 5d830cbae4 Merge pull request '„teil23/parseargs.sh“ ändern' (#1) from develop into master
Reviewed-on: #1
2025-05-13 12:06:27 +00:00
raspithek fb7c410e8a „teil23/parseargs.sh“ ändern 2025-05-13 11:58:31 +00:00
olli e4190bae83 parseargs.sh 2025-05-12 07:13:05 +02:00
olli 6545189eb0 teil21 2025-03-01 11:07:58 +01:00
olli 4e375b5d08 Schript zu Teil 20. 2025-01-28 09:54:00 +01:00
Olli Graf 2be3db4187 piping teil17 2024-11-09 10:14:32 +01:00
Olli Graf 9dc5a2550c piping 2024-11-09 10:13:32 +01:00
Olli Graf 6f82b9eda4 Beispieltext.
Quelle: https://de.wikibooks.org/wiki/De_Bello_Gallico:_Liber_I_-_Kapitel_I
2024-10-28 07:43:38 +01:00
Olli Graf 28dada6046 Anpassungen. 2024-10-08 12:45:03 +02:00
olli deeb9080fe teil17 grep Testdateien. 2024-10-08 09:49:30 +02:00
Olli Graf 578119d663 scope 2024-09-22 15:15:28 +02:00
Olli Graf 23e7a9090a Scripts zu Rückgabewerte. 2024-09-22 12:16:16 +02:00
olli 48da83fdd3 Script ausführbar gemacht. 2024-09-20 12:52:18 +02:00
olli 82620782b3 Hilfsdatei entfernt 2024-09-20 07:05:47 +02:00
raspithek b1065a657e Dateien hochladen nach „teil16“
Scripts zu Funktionen
2024-09-20 05:05:00 +00:00
olli 68a8069739 Readme aktualisiert. 2024-09-20 07:02:27 +02:00
Olli Graf 36837548d2 teil14 2024-09-08 11:33:42 +02:00
Olli Graf 407d7ef5c0 sdcardtester als Scriptbeispiel. 2024-09-08 11:32:48 +02:00
557 changed files with 912 additions and 8 deletions
+24 -6
View File
@@ -3,11 +3,29 @@
Dateien des bash Tutorioals auf raspithek.de Dateien des bash Tutorioals auf raspithek.de
| Kapitel| Beschreibung | | Kapitel| Beschreibung |
|--------|-------------| |--------|------------------------|
1 |Einführung | 1 |Einführung |
| 2 |Hello World | | 2 |Prompt |
| 3 | exit Codes | | 3 |key bindings |
| 4 |Variablen | | 4 |Startvorgang |
| 5 |Verzweigungen| | 5 |Environmentvariablen |
| 6 |Svhleifen | | 6 |builtins |
| 7 |Dateien |
| 8 |nano |
| 9 |bash Scripting |
| 10 |Variablen |
| 11 |Verzweigungen |
| 12 |Schleifen |
| 13 |Parameter |
| 14 |exit Codes |
| 15 |von der Idee zum Script |
| 16 |Funktionen |
| 17 |Piping und Redirection |
| 18 |tee |
| 19 |alias |
| 20 |Shebang |
| 21 |sed |
| 22 |cd |
| 23 |case |
| 24 |Arrays |
+2
View File
@@ -0,0 +1,2 @@
ll
+3
View File
@@ -0,0 +1,3 @@
shopt -s expand_aliases # Aktiviert Aliase
alias ll='ls -la'
ll
+66
View File
@@ -0,0 +1,66 @@
#!/usr/bin/bash
# Output colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Logging-Funktion
log() {
echo -e "${GREEN}[INFO]${NC} $1"
}
warn() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
error() {
echo -e "${RED}[ERROR]${NC} $1"
}
# Check for root privileges
if [ "$EUID" -ne 0 ]; then
echo "This script must be run as root"
exit 1
fi
# Create /boot/firmware dir if it doesn't exist
if [ ! -d /boot/firmware ]; then mkdir -p /boot/firmware; fi
# Enable extended globbing for pattern matching
shopt -s extglob
# Copy all files from /boot to /boot/firmware and remove the originals
log "Moving files to /boot/firmware..."
rsync -av --remove-source-files /boot/ /boot/firmware/
# Update the mount point for /boot in fstab to /boot/firmware
log "Updating fstab..."
cp -a /etc/fstab /etc/fstab.bak # create backup
sed -i 's|^\([^#].*\)[[:space:]]/boot[[:space:]]|\1 /boot/firmware |' /etc/fstab
# Sync cache and reboot the system to apply changes
sync
# prompt for reboot
echo ""
while true; do
read -p "Möchtest du das System jetzt neustarten, um die Änderungen zu testen? (J/N): " choice
case $choice in
[Jj]* )
warn "System will be rebooted in 3 seconds"
sleep 2
reboot
;;
[Nn]* )
log "Neustart übersprungen."
log "Bitte starte das System manuell neu, um die Änderungen zu testen."
break
;;
* )
warn "Bitte antworte mit J (Ja) oder N (Nein)."
;;
esac
done
exit 0
Executable
+11
View File
@@ -0,0 +1,11 @@
read -n1 -p "Weitermachen? (j/n)" auswahl
echo "auswahl = ${auswahl}"
if [ "${auswahl}" == 'j' ];then
echo "Es geht weiter"
else
echo "Dann eben nicht"
fi
+8
View File
@@ -0,0 +1,8 @@
Gallia est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra Galli appellantur.
Hi omnes lingua, institutis, legibus inter se differunt.
Gallos ab Aquitanis Garunna flumen, a Belgis Matrona et Sequana dividit.
Horum omnium fortissimi sunt Belgae, propterea quod a cultu atque humanitate provinciae longissime absunt, minimeque ad eos mercatores saepe commeant atque ea quae ad effeminandos animos pertinent, important, proximique sunt Germanis, qui trans Rhenum incolunt, quibuscum continenter bellum gerunt.
Qua de causa Helvetii quoque reliquos Gallos virtute praecedunt, quod fere cotidianis proeliis cum Germanis contendunt, cum aut suis finibus eos prohibent aut ipsi in eorum finibus bellum gerunt.
Eorum una pars, quam Gallos obtinere dictum est, initium capit a flumine Rhodano, continetur Garumna flumine, Oceano, finibus Belgarum, attingit etiam ab Sequanis et Helvetiis flumen Rhenum, vergit ad septentriones.
Belgae ab extremis Galliae finibus oriuntur, pertinent ad inferiorem partem fluminis Rheni, spectant in septentrionem et orientem solem.
Aquitania a Garunna flumine ad Pyrenaeos montes et eam partem Oceani quae est ad Hispaniam pertinet; spectat inter occasum solis et septentriones.
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File

Some files were not shown because too many files have changed in this diff Show More